public void loose_map_tests()
        {
            IMapper mapper;
            First   first;
            Second  second;

            mapper = new RecursiveMapper(new StoragelessMapRepository(new SourceCopyMapBuilder()));

            first = new First
            {
                IntProperty    = 34,
                StringProperty = "Some string",
            };

            second = new Second
            {
                Intproperty            = 666,
                StringProperty         = "aaa",
                Stringproperty         = "untouched",
                DoubleNullableProperty = 3.1415m,
                Amount = 89.34m,
            };

            Assert.Throws <UnpairedMappingException>(() => second.mapTo(first, mapper));

            mapper.Repository.MapBuilder = new LooseMapBuilder();
            second.mapTo(first, mapper);

            Assert.Equal(666, first.IntProperty);
            Assert.Equal("aaa", first.StringProperty);
            Assert.Equal(89.34m, first.Amount);
        }
        public void map_fails_to_new_instance_because_of_missing_target_properties()
        {
            First   first;
            Second  second;
            IMapper mapper;

            mapper = new RecursiveMapper(new StoragelessMapRepository(new StrictMapBuilder()));

            first = new First
            {
                IntProperty    = 34,
                StringProperty = "Some string",
            };

            Assert.Throws <UnpairedMappingException>(() => second = first.mapTo <Second>(mapper));
        }
        public void map_fails_to_existing_instance_because_of_missing_target_properties()
        {
            First   first;
            Second  second;
            IMapper mapper;

            mapper = new RecursiveMapper(new StoragelessMapRepository(new StrictMapBuilder()));

            first = new First
            {
                IntProperty    = 34,
                StringProperty = "Some string",
            };

            second = new Second
            {
                Intproperty            = 666,
                StringProperty         = "aaa",
                Stringproperty         = "untouched",
                DoubleNullableProperty = 3.1415m
            };

            Assert.Throws <UnpairedMappingException>(() => first.mapTo(second, mapper));
        }