Esempio n. 1
0
        public void ValidateNullableUlongNotToBeNull()
        {
            // Given
            var validator = new NullableUlongInverseValidator(0);

            // When
            validator.BeNull();

            // Then
            Assert.True(true);
        }
Esempio n. 2
0
        public void ValidateNullableUlongNotToBeNullWithReasonViolated()
        {
            // Given
            var validator = new NullableUlongInverseValidator(null);

            // When
            var exception = Assert.Throws <XunitException>(() => validator.BeNull("that's the bottom line"));

            // Then
            Assert.NotNull(exception);
            var rn = Environment.NewLine;

            Assert.Equal(
                $"{rn}validator{rn}is null{rn}but was expected not to be null{rn}because that's the bottom line",
                exception.UserMessage);
        }