I want to start using mock objects on my c# project.
After a quick google I've found that most folks use one of the below:
Does Microsoft provide a similar framework for mocking? I'm using Visual Studio tests for my unit test now.
Microsoft does not have any official public mock object frameworks. We do have some internal ones that we've used before (I work at Microsoft). In recent times we have prefered to use publicly available libraries because we give out the source code to both the projects and unit tests of many of our projects and we'd like the public (that's you!) to be able to compile and run these projects.
On my team (ASP.NET) we now most often use Moq. The author (kzu) is very receptive to our feedback and bug reports.
To see an example of how we use Moq, you can download the source code to ASP.NET MVC 2 Release Candidate, which includes both the project source code and over 2,000 unit tests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With