We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider this test code:
public interface IChild { void PlayWith(Toy toy); } public class Toy { public string Color { get; set; } public static Toy ThatIsRed => Match.Create((Toy toy) => toy.Color == "red"); } [Fact] // does not pass public void Custom_matcher_property_appears_by_name_in_verification_error_message() { var child = new Mock<IChild>(); child.Setup(c => c.PlayWith(Toy.ThatIsRed)).Verifiable(); var ex = Assert.Throws<MockException>(() => child.Verify()); Assert.Contains(".PlayWith(Toy.ThatIsRed)", ex.Message); }
The test fails with:
Message: Assert.Contains() Failure Not found: .PlayWith(Toy.ThatIsRed) In value: The following setups were not matched: IChild c => c.PlayWith(null)
The error message contains "null" instead of the matcher property's name.
"null"
The text was updated successfully, but these errors were encountered:
stakx
No branches or pull requests
Consider this test code:
The test fails with:
The error message contains
"null"
instead of the matcher property's name.The text was updated successfully, but these errors were encountered: