If you do something like this to verify that the Rollback method on your mock has never been run:
myMock.Verify(x => x.Rollback(), Times.Never);
Alright, what are the options for Times here? They are:
- Times.AtLeast(13)
- Times.AtLeastOnce
- Times.AtMost(27)
- Times.AtMostOnce
- Times.Between(42, 69, Range.Inclusive)
- Times.Exactly(86)
- Times.Never
- Times.Once
.Inclusive here will include the forty-two and the sixty-nine along with forty-three to sixty-eight while .Exclusive would include everything between these two numbers.
No comments:
Post a Comment