public void AccessToParentMember()
        {
            const BindingFlags flags = BindingFlags.FlattenHierarchy | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.GetProperty | BindingFlags.SetProperty | BindingFlags.Instance;
            var prop = typeof(BaseClassOne).GetProperty("Counter", flags);

            Assert.NotNull(prop);
            var instance = new MyDerivedClass(-1, "comment", "comment2", 2.5);
            prop.SetValue(instance, 5, null);

            Assert.AreEqual(5, instance.Counter);
        }
        public void TestOnComplexDerivedClasses()
        {
            var mapper = FactoryMapper.DynamicResolutionMapper<MyDerivedClass, DerivedClassLast>();
            Assert.NotNull(mapper);
            Assert.AreEqual(4, mapper.PropertyMappers.Count());

            MyDerivedClass source = new MyDerivedClass(1, "mycomment", "mycomment2", 12.5);
            var res = mapper.Map(source);

            Assert.NotNull(res);
            Assert.AreEqual(source.Avarage, res.Avarage);
            Assert.AreEqual(source.Comment, res.Comment);
            Assert.AreEqual(source.CommentTwo, res.CommentTwo);
            Assert.AreEqual(source.Counter, res.Counter);
        }