i am required to quickly learn a mocking framework that allows mocking static methods and write test cases for an application written in C#. which framework would you recommend?
Asked
Active
Viewed 1,983 times
1 Answers
13
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

famousgarkin
- 13,687
- 5
- 58
- 74

Elisha
- 23,310
- 6
- 60
- 75
-
4-1 for only linking your own product... Find JustMock here: http://www.telerik.com/products/mocking.aspx and Moles here: http://research.microsoft.com/en-us/projects/moles/ – Michiel van Oosterhout Sep 26 '10 at 16:33