예제 #1
0
        public void TestMapClassNoId()
        {
            Type theType = typeof(EntityNoId);

            ClassMapper mapper = new ClassMapper();
            mapper.Map(theType);
        }
예제 #2
0
        public void TestMapClassProperties()
        {
            Type theType = typeof (BasicEntity);

            ClassMapper mapper = new ClassMapper();
            ClassMap map = mapper.Map(theType);

            map.Should().NotBeNull();

            map.Properties.Should().NotBeNull();
            map.Properties.Should().NotBeEmpty();
            map.Properties.Should().HaveCount(3);

            PropertyMap propertyMap = map.Properties[0];
            propertyMap.Name.Should().BeEquivalentTo("MyPropertyA");
            propertyMap.Type.Should().Be<string>();
        }
예제 #3
0
 public void TestMapEmptyClass()
 {
     ClassMapper mapper = new ClassMapper();
     mapper.Map(typeof(EmptyEntity));
 }