DISQUS

Andrey Shchekin's Blog: NMock 3.5

  • Eyad.Salamin · 2 years ago
    Wow! Great job Andrey, It seems like expression trees will bring back life to NMock2.
    Would you please send me copy of the code?

    Thanks.
  • Andrey Shchekin · 2 years ago
    Thanks! Could you please give me your email?
    Mine is ashmind+blog(at)gmail.com.
  • Andrew · 1 year ago
    Andrey,

    Nice one! I had a slightly different approach though (scroll downto "Improvements: NMock2 + C#3." at http://codevanced.net/post/Touching-a-hot-iron-... )
  • Andrey Shchekin · 1 year ago
    Thanks! I really recommend looking at Moq, however, since NMock2 seems to be dead for a while now.
    I have moved to Moq and it saved me from writing a whole new API for NMock2 just to get more modern syntax.

    Also Moq people were very responsive at fixing bugs when they still had them.
    I wish I could say the same about latest NMock2.
  • Andrew · 1 year ago
    >NMock2 seems to be dead for a while now.

    Latest release appears to be of December 06 2008 at sourceforge, and SVN statistics ( http://sourceforge.net/project/stats/detail.php... ) shows some checkins :)

    Why do you think it's "dead for a while"?
  • Andrey Shchekin · 1 year ago
    Now that's interesting.
    I am subscribed to their newsgroup and there was only occasional activity for almost a year (consistent with no releases for a while).
    It seems that they started releasing and the discussions moved elsewhere so that's the reason for my error.

    However unless they already support .NET 3.5 syntax, it still seems for me that MoQ is easier to use for NET 3.5 projects.
  • Urs Enzler · 11 months ago
    Yes NMock2 is alive. But there is quite a bit room for confusion because you have to go to http://sourceforge.net/projects/nmock2/ and not nmock.org.
    The reason is that the developers of NMock version 1.0 and 2.0 (nmock.org) have stopped their development and it is continued by another team on http://sourceforge.net/projects/nmock2/

    Back to lambdas:
    Do you have a solution that supports defining expectations on properties and indexers as well?

    Happy mocking
    Urs