示例#1
0
		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);
		}
示例#2
0
        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);
        }
示例#3
0
        /// <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);
        }
示例#4
0
        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);
                }
            }
        }
示例#5
0
        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);
        }