public void ValidateNullableSByteToBePositive() { // Given var validator = new NullableFloatInverseValidator(null); // When validator.BePositive(); // Then Assert.True(true); }
public void ValidateSByteNotToBePositiveViolated() { // Given var validator = new NullableFloatInverseValidator(0); // When var exception = Assert.Throws <XunitException>(() => validator.BePositive(because: "that's the bottom line")); // Then Assert.NotNull(exception); var rn = Environment.NewLine; Assert.Equal( $"{rn}validator{rn}is \"0\"{rn}but was expected not to have a positive value{rn}because that's the bottom line", exception.UserMessage); }