예제 #1
0
        public void Nested_property_is_empty()
        {
            // Arrange
            var sut = new RecursiveTestHelperWithOnePropAndOneList {
                Number = 1, RecursiveTestHelperWithOneProps = new List <RecursiveTestHelperWithOneProp>()
            };

            // Assert
            Assert.Throws <XunitException>(() => sut.Should().NotContainNullsOrEmptyEnumerables());
        }
예제 #2
0
        public void Nested_property_is_not_null_contained_object_and_its_prob_is_not_null()
        {
            // Arrange
            var sut = new RecursiveTestHelperWithOnePropAndOneList
            {
                Number = 1,
                RecursiveTestHelperWithOneProps = new List <RecursiveTestHelperWithOneProp> {
                    new RecursiveTestHelperWithOneProp {
                        Number = 1
                    }
                },
            };

            // Assert
            sut.Should().NotContainNullsOrEmptyEnumerables();
        }
예제 #3
0
        public void NestedPropertyIsNotNullContainedObjectAndItsProbIsNotNull()
        {
            // Arrange
            var sut = new RecursiveTestHelperWithOnePropAndOneList
            {
                Number = 1,
                RecursiveTestHelperWithOneProps = new List <RecursiveTestHelperWithOneProp> {
                    new RecursiveTestHelperWithOneProp {
                        Number = 1
                    }
                },
            };

            // Assert
            sut.Should().NotContainNullsOrEmptyEnumerables();
        }