public void ShouldMapComplexObjectWhenInnerPropIsNull() { var data = new Model3 { Inner = null }; var target = data.Map(ObjectMapper <Model3, Dto3> .Default); target.Should().BeEquivalentTo(new Dto3() { Inner = null }); }
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" } }); }