C# is there a a spying framework like mockito for .NET 3.5?

Artem picture Artem · Apr 2, 2013 · Viewed 14.5k times · Source

I used to have a very convenient spying framework in java called Mockito. It allows you to mock some of methods on existing objects and also could tell you if others were called (you'd create a spy wrapper for that). Is there anything like that for C# in .NET 3.x?

Answer

Dylan Smith picture Dylan Smith · Apr 2, 2013

It sounds like you are describing "partial mocks". Some (most?) mocking frameworks have support for that. I know for sure Moq and RhinoMocks do.