The Basics
var mock = new Mock<IThingToMock>();
mock.Setup(x => x.DoThis()).Returns(true);
IThingToMock object = mock.Object;
...
mock.Verify(x => x.DoThis(), Times.AtMostOnce());
var mock = new Mock<IThingToMock>();
mock.Setup(x => x.DoThis()).Returns(true);
IThingToMock object = mock.Object;
...
mock.Verify(x => x.DoThis(), Times.AtMostOnce());
Want to get my personal insights on what I learn as I learn it? Subscribe now!