--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/WUhGKxoDSRUJ.
To post to this group, send email to nsubs...@googlegroups.com.
To unsubscribe from this group, send email to nsubstitute...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nsubstitute?hl=en.
--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/0gE7lj82eUoJ.
Would it be possible to modify your existing extensions to have .ReceivedOnly(...) or similar to verify only those calls were received?
I'd be keen to see the code you used for the extensions if you're happy to share it. :)
So I plan to go ahead and try to play with the code. Any advice is appreciated btw.
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/fGqD6PzO5pUJ.
--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/d8GHiLmJDIsJ.
--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
As an alternative syntax to setup expectations, perhaps something like this could work?
using( var expect = Substitute.SetupExpectations() )
{
sub.Bar().Times( 10 ).Returns( ... ); // expected 10 calls
}
Verify would work the same.
Until "expect" is disposed any calls to substitute setup expectations.
This doesn't break existing or modify existing syntax.
Not sure how feasible or complicated it would be to add support for something like this. Or if you guys even like this approach.
Slav Ivanyuk
--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/ODl4218vCW0J.
Hello Slav, I would stay away from this syntax as it is somewhat obsolete and superseded by the AAA syntax.
--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/qrZr6OK7S3EJ.
Hello Slav, I would stay away from this syntax as it is somewhat obsolete and superseded by the AAA syntax.
--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/qrZr6OK7S3EJ.
Would that include calls stubbed out via Returns()?
Or just calls you checked were Received()?