示例#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));
 }