Exemplo n.º 1
0
 public IAssert <T> IsNotNull()
 {
     if (isNotNullAssertion == null)
     {
         isNotNullAssertion = new IsNotNullAssertion <T>();
     }
     return(this);
 }
Exemplo n.º 2
0
        public void Returns_True_When_Validating_Non_Null_Values()
        {
            // Arrange
            var assertion = new IsNotNullAssertion(new object());

            // Act
            bool result = assertion.IsValid();

            // Assert
            Assert.IsTrue(result);
        }
Exemplo n.º 3
0
        public void Returns_False_When_Validating_Null_Values()
        {
            // Arrange
            var assertion = new IsNotNullAssertion(null);

            // Act
            bool result = assertion.IsValid();

            // Assert
            Assert.IsFalse(result);
        }