c# - How Can I assert /verify a Moq Protected Method? -
I have a personal method that should return the truth. I am using Newsent and MOQ so I have: [testfiexture] Public class customer credentials {var customermoc = new fake & lt; ICustomer & gt; () CustomerMock.Protected () .setup & lt; Bool & gt; ("CanTestPrivateMethod"). Return (true); // How can I tell it now since I can not be a customer? Verify // Verify does not exist} There is nothing on Google that tells you how to test it. As you can see, I can set up one for this but can not emphasize. Am I not clear? Thanks a lot. You do not want to test a method on a duplicate, to test the method on the example of the actual class Want to The way to go to a class is to use an accelerator, note that VS For them, you can also make AssemblyVisibleTo in your test project in the AssemblyInfo.cs file, for an internal method, you can make them available automatically, or you can "roll your roll" using the reflection. [TextFixture] Public Category...