AutoMapper.UnitTests.MaxDepthTests.Third_level_children_are_null_with_max_depth_2 C# (CSharp) Method

Third_level_children_are_null_with_max_depth_2() private method

private Third_level_children_are_null_with_max_depth_2 ( ) : void
return void
        public void Third_level_children_are_null_with_max_depth_2()
        {
            var config = new MapperConfiguration(cfg => cfg.CreateMap<Source, Destination>().MaxDepth(2));
            var destination = config.CreateMapper().Map<Source, Destination>(_source);
            foreach (var child in destination.Children)
            {
                child.Children.ShouldNotBeNull();
                foreach (var subChild in child.Children)
                {
                    subChild.ShouldBeNull();
                }
            }
        }