public void ValidateEnumerableToBeNullOrEmpty() { // Given var validator = new EnumerableValidator <int>(null); // When validator.BeNullOrEmpty(); // Then Assert.True(true); }
public void ValidateEnumerableToBeNullOrEmtpyViolated() { // Given var validator = new EnumerableValidator <int>(new List <int> { 1 }); // When var exception = Assert.Throws <XunitException>(() => validator.BeNullOrEmpty("that's the bottom line")); // Then Assert.NotNull(exception); var rn = Environment.NewLine; Assert.Equal( $"{rn}validator{rn}contains \"1\" item(s){rn}but was expected to be null or empty{rn}because that's the bottom line", exception.UserMessage); }