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