Last active
August 3, 2017 05:30
-
-
Save HamidMosalla/a1524017155cdd5fba594b1daea4417c to your computer and use it in GitHub Desktop.
This file contains 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 TrackAllPropertiesWithSetupAllProperties() | |
{ | |
var mock = new Mock<IPropertyManager>(); | |
//mock.SetupProperty(m => m.FirstName); | |
//Comment this and uncomment SetupProperty, the assertion fails | |
mock.SetupAllProperties(); | |
mock.Object.FirstName = "Robert"; | |
mock.Object.LastName = "Paulson"; | |
mock.Object.FirstName.Should().Be("Robert"); | |
mock.Object.LastName.Should().Be("Paulson"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment