예제 #1
0
            public void DoesNotMapPropertyWhenCanMapIsFalse()
            {
                var mapper = new TestMapper <Foo>();
                Func <Type, PropertyInfo, bool> canMap = (t, p) => ReflectionHelper.IsSimpleType(p.PropertyType);

                mapper.TestProtected().RunMethod("AutoMap", canMap);
                Assert.Equal(1, mapper.Properties.Count);
            }
예제 #2
0
            public void IgnoringAnEnumerableDoesNotCauseError()
            {
                var mapper = new TestMapper <Foo>();

                mapper.Map(m => m.List).Ignore();
                mapper.TestProtected().RunMethod("AutoMap");
                Assert.Equal(2, mapper.Properties.Count);
            }