Last active
December 11, 2015 06:58
-
-
Save ThomasArdal/4562879 to your computer and use it in GitHub Desktop.
A test using the Verify-method of Moq.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void SomeTest() { | |
// Arrange | |
var mock = new Mock<IDependency>(); | |
var sut = new ServiceUnderTest(mock.Object); | |
// Act | |
sut.DoIt(); | |
// Assert | |
mock.Verify(x => x.AMethodCall( | |
It.Is<string>(s => s.Equals("Hello")), | |
It.Is<string>(s => s.Equals("World")))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment