public void TestOwnEmbedded() { var pm = PmFactory.NewPersistenceManager(); Parent p1 = new Parent(); pm.MakePersistent(p1); pm.Save(); ChildEmbedded ce = new ChildEmbedded(); p1.ChildEmbedded = ce; Assert.AreEqual(NDOObjectState.PersistentDirty, p1.NDOObjectState, "Falscher Status 1"); }
public void TestEmbedded() { var pm = PmFactory.NewPersistenceManager(); Parent p1 = new Parent(); Parent p2 = new Parent(); pm.MakePersistent(p1); pm.MakePersistent(p2); pm.Save(); ChildEmbedded ce = new ChildEmbedded(); p1.ManipulateEmbedded(p2, ce); Assert.AreEqual(NDOObjectState.Persistent, p1.NDOObjectState, "Falscher Status 1"); Assert.AreEqual(NDOObjectState.PersistentDirty, p2.NDOObjectState, "Falscher Status 2"); }