NSubstitute 1.6.0 is now available for download from
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