예제 #1
0
        private void MapTestInner(MapRegister mapRegister)
        {
            var mapper = new Mapper(mapRegister);

            var expected1 = new MapTest03 {
                MyProperty01 = "1"
            };
            var expected2 = new MapTest04 {
                MyProperty01 = 2
            };
            var actual2 = mapper.Map <MapTest04>(expected1);
            var actual1 = mapper.Map <MapTest03>(actual2);

            actual1.Is(expected1);
            actual2.Is(expected2);
        }
예제 #2
0
        public void MapTest004()
        {
            var mapRegister = new MapRegister();

            mapRegister.RegisterDefinition(new MapDefinition01());
            var mapper = new Mapper(mapRegister);

            var expected1 = new MapTest05 {
                MyProperty01 = "1"
            };
            var expected2 = new MapTest04 {
                MyProperty01 = 2
            };
            var actual2 = mapper.Map <MapTest04>(expected1);
            var actual1 = mapper.Map <MapTest05>(actual2);

            actual1.Is(expected1);
            actual2.Is(expected2);
        }