I’m using the beta of Microsoft Fakes in Visual Studio 11. How can I verify that a dependency’s method was called by my system under test?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As verify functionality is not included in the Microsoft Fakes Beta, the code below is a basic test for whether or not a method on a dependency was called. You could enhance the
truetest to test parameter values or other conditions of a proper call.Test:
Classes:
Uncomment the line above to see the test pass.