public void ValidateStringNotMatchesValue() { // Given var validator = new StringInverseValidator("string"); // When validator.Match("other"); // Then Assert.True(true); }
public void ValidateStringNotMatchesWildcardIgnoreCaseValueViolated() { // Given var validator = new StringInverseValidator("string"); // When var exception = Assert.Throws <XunitException>(() => validator.Match("sT*Ng", ignoreCase: true, because: "that's the bottom line")); // Then Assert.NotNull(exception); var rn = Environment.NewLine; Assert.Equal( $"{rn}validator{rn}is \"string\"{rn}but was expected to not match pattern \"sT*Ng\"{rn}because that's the bottom line", exception.UserMessage); }