Skip to content

Instantly share code, notes, and snippets.

@HamidMosalla
Created August 3, 2017 05:39
Show Gist options
  • Save HamidMosalla/4cd91f390c006b82599d56f40d09f72b to your computer and use it in GitHub Desktop.
Save HamidMosalla/4cd91f390c006b82599d56f40d09f72b to your computer and use it in GitHub Desktop.
[Fact]
public void Verify()
{
var mock = new Mock<IPropertyManager>();
var nameUser = new PropertyManagerConsumer(mock.Object);
nameUser.ChangeRemoteName("My dear old wig");
//we are verifying that ChangeRemoteName sends the correct string to MutateFirstName
mock.Verify(m => m.MutateFirstName(It.Is<string>(a => a == "My dear old wig")), Times.Once);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment