Created
July 29, 2011 21:47
-
-
Save ferventcoder/1114813 to your computer and use it in GitHub Desktop.
Moq Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mock.Verify(m => m.Subscribe<Message>(someclass.SomeMethod, null, x => true), Times.AtLeastOnce()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
don't know if this is possible with moq (haven't used it in a while due to it's moq.Object tax) but with Rhino you can register a callback to fire when the method is called (if set as a setup/expectation, anyway) and in that callback have access to the method invocation that was matched (m.Subscribe() in this case) including it's args. If moq has a similar idiom then perhaps you could trap the matching method invocation and peek at the type of someclass.SomeMethod as seen by moq. It may not be an Action... even if that's the arg type and how the type of SomeMethod looks to you.