public void Execute(IPlatformFactory factory, ITestLogger logger) { MgObjectPropertyDefinition opd = new MgObjectPropertyDefinition("odpName"); MgClassDefinition classDef = new MgClassDefinition(); classDef.Name = "testClassDef"; opd.ClassDefinition = classDef; Assert.AreEqual(classDef.Name, opd.ClassDefinition.Name); opd.ObjectType = MgObjectPropertyType.OrderedCollection; Assert.AreEqual(MgObjectPropertyType.OrderedCollection, opd.ObjectType); opd.OrderType = MgOrderingOption.Ascending; Assert.AreEqual(MgOrderingOption.Ascending, opd.OrderType); MgDataPropertyDefinition dpd = new MgDataPropertyDefinition("dpdName"); opd.IdentityProperty = dpd; Assert.AreEqual(dpd.Name, opd.IdentityProperty.Name); }
public void ObjectPropertyDefinition() { MgObjectPropertyDefinition opd = new MgObjectPropertyDefinition("odpName"); MgClassDefinition classDef = new MgClassDefinition(); classDef.Name = "testClassDef"; opd.ClassDefinition = classDef; Assert.AreEqual(classDef.Name, opd.ClassDefinition.Name); opd.ObjectType = MgObjectPropertyType.OrderedCollection; Assert.AreEqual(MgObjectPropertyType.OrderedCollection, opd.ObjectType); opd.OrderType = MgOrderingOption.Ascending; Assert.AreEqual(MgOrderingOption.Ascending, opd.OrderType); MgDataPropertyDefinition dpd = new MgDataPropertyDefinition("dpdName"); opd.IdentityProperty = dpd; Assert.AreEqual(dpd.Name, opd.IdentityProperty.Name); }