public void ValidateStringNotToBeNull() { // Given var validator = new StringInverseValidator("string"); // When validator.BeNull(); // Then Assert.True(true); }
public void ValidateStringNotToBeNullViolated() { // Given var validator = new StringInverseValidator(null); // When var exception = Assert.Throws <XunitException>(() => validator.BeNull(because: "that's the bottom line")); // Then Assert.NotNull(exception); var rn = Environment.NewLine; Assert.Equal( $"{rn}validator{rn}is \"\"{rn}but was expected not to be null{rn}because that's the bottom line", exception.UserMessage); }