#2 Allow mocking of classes

open
nobody
Core (4)
5
2008-10-07
2008-10-07
Peter Wain
No

Currently only interfaces can be mocked. The ability to mock classes can be useful in a number of cases. For more information see thread at:

https://sourceforge.net/forum/message.php?msg_id=5351220

Discussion

  • Peter Wain
    Peter Wain
    2008-10-07

    I've attached a work-in-progress patch to support class mocking in NMock2. The patch was made from the trunk folder, revision 71. The zip file contains the patch and two assemblies that need to be added to the lib folder.

    This new functionality is built on top of Castle DynamicProxy2 (RC3), which is doing all the heavy lifting in terms of proxy creation and method interception.

    I've made a start on fleshing out the test suite to cover these changes, but more work is required.
    File Added: ClassMockingPatch.zip

     
  • Peter Wain
    Peter Wain
    2008-10-07

    Patch for adding class mocking support to NMock2

     
  • Peter Wain
    Peter Wain
    2008-10-07

    File Added: ClassMockingPatchV2.zip