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