public void ValidateGuidToBeEmpty() { // Given var validator = new GuidValidator(Guid.Empty); // When validator.BeEmpty(); // Then Assert.True(true); }
public void ValidateGuidToBeEmptyViolated() { // Given var guid = Guid.NewGuid(); var validator = new GuidValidator(guid); // When var exception = Assert.Throws <XunitException>(() => validator.BeEmpty(because: "that's the bottom line")); // Then Assert.NotNull(exception); var rn = Environment.NewLine; Assert.Equal( $"{rn}validator{rn}is \"{guid}\"{rn}but was expected to be empty{rn}because that's the bottom line", exception.UserMessage); }