Tagmocks

Mocking Adventures with NMock2: Stubs Advanced

M

NMock2 is a library for assisting test driven development of .NET code by providing a dynamic mock object creation framework.
In my last post on NMock2, I introduced the new Stub feature of NMock2 and its basic usage. In the second part, we are going to have a look at the advanced possibilities of the Stub mock style:

Define Mock Style Of Nested Mocks
Define Default Values

Mocking Adventures with NMock2: Stubs

M

NMock2 is a library for assisting test driven development of .NET code by providing a dynamic mock object creation framework. In this article, I’m going to show you the basics of the new stub feature in NMock2. Note that this feature is currently only available on the development trunk in the subversion repository at . Therefore, the features discussed here may change for the next official release. Stubs can be used in scenarios where you have to test an instance of a class (let’s call this...

Recent Posts