public void ValidateBooleanToBeValue() { // Given var validator = new BoolValidator(true); // When validator.Be(true); // Then Assert.True(true); }
public void ValidateBooleanToBeValueViolated() { // Given var validator = new BoolValidator(true); // When var exception = Assert.Throws <XunitException>(() => validator.Be(false, "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); }