public void ValidateStringNotToBeCaseSensitiveValue() { // Given var validator = new StringInverseValidator("string"); // When validator.Be("STRING"); // Then Assert.True(true); }
public void ValidateStringNotToBeNullValue() { // Given var validator = new StringInverseValidator("string"); // When validator.Be(null); // Then Assert.True(true); }
public void ValidateStringNotToBeValueViolated() { // Given var validator = new StringInverseValidator("string"); // When var exception = Assert.Throws <XunitException>(() => validator.Be("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 not to be \"string\"{rn}because that's the bottom line", exception.UserMessage); }
public void ValidateNullStringNotToBeValueViolated() { // Given var validator = new StringInverseValidator(null); // When var exception = Assert.Throws <XunitException>(() => validator.Be(null)); // Then Assert.NotNull(exception); var rn = Environment.NewLine; Assert.Equal( $"{rn}validator{rn}is \"\"{rn}but was expected not to be \"\"", exception.UserMessage); }
public void ValidateStringNotToBeCaseInsensitiveValue() { // Given var validator = new StringInverseValidator("string"); // When var exception = Assert.Throws <XunitException>(() => validator.Be("STRING", ignoreCase: true)); // Then Assert.NotNull(exception); var rn = Environment.NewLine; Assert.Equal( $"{rn}validator{rn}is \"string\"{rn}but was expected not to be \"STRING\"", exception.UserMessage); }