public virtual void Test() { IExtObjectContainer oc1 = OpenNewSession(); IExtObjectContainer oc2 = OpenNewSession(); try { RefreshTestCase.Item r1 = GetRoot(oc1); r1.name = "cc"; oc1.Refresh(r1, 0); Assert.AreEqual("cc", r1.name); oc1.Refresh(r1, 1); Assert.AreEqual("o1", r1.name); r1.child.name = "cc"; oc1.Refresh(r1, 1); Assert.AreEqual("cc", r1.child.name); oc1.Refresh(r1, 2); Assert.AreEqual("o2", r1.child.name); RefreshTestCase.Item r2 = GetRoot(oc2); r2.name = "o21"; r2.child.name = "o22"; r2.child.child.name = "o23"; oc2.Store(r2); oc2.Commit(); oc1.Refresh(r1, 3); Assert.AreEqual("o21", r1.name); Assert.AreEqual("o22", r1.child.name); Assert.AreEqual("o23", r1.child.child.name); } finally { oc1.Close(); oc2.Close(); } }
protected override void Store() { RefreshTestCase.Item r3 = new RefreshTestCase.Item("o3", null); RefreshTestCase.Item r2 = new RefreshTestCase.Item("o2", r3); RefreshTestCase.Item r1 = new RefreshTestCase.Item("o1", r2); Store(r1); }
public Item(string name, RefreshTestCase.Item child) { this.name = name; this.child = child; }