Esempio n. 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());
        }
Esempio n. 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();
        }
Esempio n. 3
0
        public void NestedPropertyIsNotNullContainedObjectAndItsProbIsNotNull()
        {
            // Arrange
            var sut = new RecursiveTestHelperWithOnePropAndOneList
            {
                Number = 1,
                RecursiveTestHelperWithOneProps = new List <RecursiveTestHelperWithOneProp> {
                    new RecursiveTestHelperWithOneProp {
                        Number = 1
                    }
                },
            };

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