public void ValidateStringNotContainsValue() { // Given var validator = new StringInverseValidator("string"); // When validator.Contain("other"); // Then Assert.True(true); }
public void ValidateStringNotContainsValueViolated() { // Given var validator = new StringInverseValidator("string"); // When var exception = Assert.Throws <XunitException>(() => validator.Contain("string", "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 contain \"string\"{rn}because that's the bottom line", exception.UserMessage); }