public void TestCreateRelProp() { IBOPropCol propCol = mPropDefCol.CreateBOPropertyCol(true); IRelProp relProp = mRelPropDef.CreateRelProp(propCol); Assert.AreEqual("Prop", relProp.OwnerPropertyName); Assert.AreEqual("PropName", relProp.RelatedClassPropName); Assert.IsTrue(relProp.IsNull); }
public void TestCreateRelPropNotNull() { PropDef propDef = new PropDef("Prop1", typeof(string), PropReadWriteRule.ReadWrite, "1"); RelPropDef relPropDef = new RelPropDef(propDef, "PropName1"); PropDefCol propDefCol = new PropDefCol(); propDefCol.Add(propDef); IBOPropCol propCol = propDefCol.CreateBOPropertyCol(true); IRelProp relProp = relPropDef.CreateRelProp(propCol); Assert.AreEqual(relPropDef.OwnerPropertyName, relProp.OwnerPropertyName); Assert.AreEqual(relPropDef.RelatedClassPropName, relProp.RelatedClassPropName); Assert.IsFalse(relProp.IsNull); }