示例#1
0
        public void ShouldMapComplexObjectWhenInnerPropIsNull()
        {
            var data = new Model3 {
                Inner = null
            };


            var target = data.Map(ObjectMapper <Model3, Dto3> .Default);

            target.Should().BeEquivalentTo(new Dto3()
            {
                Inner = null
            });
        }
示例#2
0
        public void ShouldMapComplexObjectWhenInnerPropHasValue()
        {
            var data = new Model3 {
                Inner = new InnerModel3()
                {
                    InnerStrProp = "str"
                }
            };
            var target = data.Map(ObjectMapper <Model3, Dto3> .Default);

            target.Should().BeEquivalentTo(new Dto3()
            {
                Inner = new InnerDto3()
                {
                    InnerStrProp = "str"
                }
            });
        }