Skip to content

Instantly share code, notes, and snippets.

@dmitrijs-balcers
Created March 24, 2014 10:50
Show Gist options
  • Save dmitrijs-balcers/9738124 to your computer and use it in GitHub Desktop.
Save dmitrijs-balcers/9738124 to your computer and use it in GitHub Desktop.
[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