Created
March 24, 2014 10:50
-
-
Save dmitrijs-balcers/9738124 to your computer and use it in GitHub Desktop.
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
[Fact()] | |
public void getFizzBuzzTest() | |
{ | |
var mock = new Moq.Mock<Converter>(); | |
mock.Setup(c => c.convert(Moq.It.IsAny<int>())) | |
.Returns((int val) => { return "" + val; }); | |
Play play = new Play(4, mock.Object); | |
Assert.Equal("1, 2, 3, 4", play.getFizzBuzz()); | |
mock.Verify(c => c.convert(Moq.It.IsAny<int>()), Moq.Times.Exactly(4)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment