Moq-Sequences
Moq-Sequences copied to clipboard
Enforce that method calls are done in a specified sequence
In a simple usage like this: var mock = new Mock(); using (Sequence.Create()) { mock.Setup(m => m.Method1()).InSequence(); mock.Setup(m => m.Method2()).InSequence(); mock.DoStuff(); } If an exception is thrown from the `DoStuff()`...
When added callback in Mock.Setup verifying of sequence is fail. I looked to source code and noticed that AddStep adds Callback and when we pass Action to ISetup.Callback it overrides...
The homepage URL mentioned next to the GitHub repository description (http://dpwhelan.com/moq.sequences) appears to be broken and should probably be updated or removed. /cc @dwhelan
When a method is called multiple times with different parameters, all of the calls are treated the same, regardless of the parameters. This is a sample code to illustrate the...
I'm trying to verify that a call is not made before another call in a sequence. (It is actually made afterwards, not part of what I want to test but...