public void FieldPropertyInfos() { Modelinfo modelinfo = new Modelinfo(typeof(MdelinfoFoo)); PropertyInfo[] fieldPropertyInfos = modelinfo.FieldPropertyInfos; Assert.AreEqual(1, fieldPropertyInfos.Length); modelinfo = new Modelinfo(typeof(ModelinfoBar)); fieldPropertyInfos = modelinfo.FieldPropertyInfos; Assert.AreEqual(1, fieldPropertyInfos.Length); }
public static Modelinfo Get(Type type) { if(modelInfos.ContainsKey(type)) modelInfos[type] = new Modelinfo(type); return modelInfos[type]; }
public void TableName() { Modelinfo modelinfo = new Modelinfo(typeof(MdelinfoFoo)); Assert.AreEqual("modelinfofoo",modelinfo.TableName); }
public void keyPropertyInfo() { Modelinfo modelinfo = new Modelinfo(typeof(MdelinfoFoo)); Assert.IsNotNull(modelinfo.keyPropertyInfo); Assert.AreEqual("Id", modelinfo.keyPropertyInfo.Name); }
public void KeyName() { Modelinfo modelinfo = new Modelinfo(typeof(MdelinfoFoo)); Assert.AreEqual("Id", modelinfo.KeyName); }