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