public void TestGetObjMappingName_没有定义映射() { AttributeHelper helper = new AttributeHelper(); string mappingName = helper.GetTypeMappingName(typeof(DataItem_MappingClass_NoneMapping)); Assert.AreEqual("", mappingName); }
public void TestGetObjMappingName_定义多种特性() { AttributeHelper helper = new AttributeHelper(); string mappingName = helper.GetTypeMappingName(typeof(DataItem_MappingClass_OtherToo)); Assert.AreEqual("TestMappingName", mappingName); }
public void TestGetPropertyMappingName_定义多种特性() { AttributeHelper helper = new AttributeHelper(); PropertyInfo property = typeof(DataItem_MappingProperty).GetProperty("MappingAll"); string dataMappingName, listMappingName; helper.GetPropertyMappingName(property, out dataMappingName, out listMappingName); Assert.AreEqual("TestMappingAll", dataMappingName); Assert.IsTrue(string.IsNullOrEmpty(listMappingName)); }