nsubstitute/NSubstitute — pull request #163 by Erwinvandervalk (2014-10-16 08:16:17+00:00)
Title: Added a CaptureTo method

When building a system that sends complex messages around, sometimes
argument matchers can be a bit cumbersome to work with. In those cases,
it's better to capture arguments and then write specific asserts against
them.

With Arg.Do you can capture an argument, like:
Arg.Do(x => _valueToCapture = x), but it doesn't really describe the
intent. I had a lot of junior developers in my team who did not
understand this syntax. An explicit 'CaptureTo' method would be much
clearer for them.

Note, the implementation is very rough. If you like the syntax, i can
clean up the implementation.