protected override void Because_of() { var source = new ParentSource { Value = new Source { Foo = "5", } }; _result = Mapper.Map <ParentSource, ParentDestination>(source); }
protected override void Establish_context() { Mapper.CreateMap <Source, Destination>().ConvertUsing(arg => new Destination { Type = Convert.ToInt32(arg.Foo) }); Mapper.CreateMap <ParentSource, ParentDestination>(); var source = new ParentSource { Value = new Source { Foo = "5", } }; _result = Mapper.Map <ParentSource, ParentDestination>(source); }