Hello, All
I experimented with Verify method as well, this is how it works:
- - - - -
Job job = null;
service.Object.Create(new Job { Title = "title 1", Description =
"description 1" });
service.Object.Create(new Job { Title = "title 2", Description =
"description 2" });
service.Verify(x => x.Create(It.IsAny(ref job)));
AssertAreEqual("title 1", job.Title);
AssertAreEqual("description 1", job.Description);
service.Verify(x => x.Create(It.IsAny(ref job)));
AssertAreEqual("title 2", job.Title);
AssertAreEqual("description 2", job.Description);
- - - - -
One thing to notice is that Verify captures calls in order execution.
This differs from normal Verify semantic, where we have no notion of
order.
- Alex