[ANN] NSubstitute 1.6.0 released

96 views
Skip to first unread message

David Tchepak

unread,
Apr 19, 2013, 9:56:40 AM4/19/13
to nsubs...@googlegroups.com
NSubstitute 1.6.0 is now available for download from
http://nsubstitute.github.com and from the NuGet feed.

Thanks to Eric Winkler, Johan Appelgren and David Gardiner for contributing to this release.

This release has several bug fixes, and a new `AndDoes()` method that can be used to setup a callback after setting up a `Returns()`. For example (from [1]):

calculator
    .Add(0,0)
    .ReturnsForAnyArgs(x => 0)
    .AndDoes(x => counter++);

Previously this would all be done in the `Returns`/`ReturnsForAnyArgs` action. `AndDoes` gives us the option to separate the return value from the callback, which hopefully makes the code a little clearer. Thanks to Phil Haack for this suggestion.


Cheers,
Dave
Reply all
Reply to author
Forward
0 new messages