protected override void Store() { CascadeToVectorTestCase ctv = new CascadeToVectorTestCase(); ctv.vec = new ArrayList(); ctv.vec.Add(new Atom("stored1")); ctv.vec.Add(new Atom(new Atom("storedChild1"), "stored2")); Store(ctv); }
/// <exception cref="System.Exception"></exception> public virtual void ConcDelete(IExtObjectContainer oc, int seq) { IObjectSet os = oc.Query(typeof(CascadeToVectorTestCase)); if (os.Count == 0) { // already deleted return; } Assert.AreEqual(1, os.Count); CascadeToVectorTestCase ctv = (CascadeToVectorTestCase)os.Next(); // wait for other threads Thread.Sleep(500); oc.Delete(ctv); }
public virtual void Check(IExtObjectContainer oc) { CascadeToVectorTestCase ctv = (CascadeToVectorTestCase)((CascadeToVectorTestCase) RetrieveOnlyInstance(oc, typeof(CascadeToVectorTestCase))); IEnumerator i = ctv.vec.GetEnumerator(); while (i.MoveNext()) { Atom atom = (Atom)i.Current; Assert.AreEqual("updated", atom.name); if (atom.child != null) { Assert.AreEqual("storedChild1", atom.child.name); } } }
public virtual void Conc(IExtObjectContainer oc) { CascadeToVectorTestCase ctv = (CascadeToVectorTestCase)((CascadeToVectorTestCase) RetrieveOnlyInstance(oc, typeof(CascadeToVectorTestCase))); IEnumerator i = ctv.vec.GetEnumerator(); while (i.MoveNext()) { Atom atom = (Atom)i.Current; atom.name = "updated"; if (atom.child != null) { // This one should NOT cascade atom.child.name = "updated"; } } oc.Store(ctv); }