We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questioni am required to quickly learn a mocking framework that allows mocking static methods and write test cases for an a开发者_JS百科pplication written in C#. which framework would you recommend?
You can do it using the following frameworks:
- Typemock Isolator
- JustMock
- Moles (You can only stub the methods, you can't assert them).
Example of faking a static method using Isolator:
Isolate.WhenCalled(() => MyClass.MethodReturningZero()).WillReturn(1);
Disclaimer - I work at Typemock
精彩评论