/// <exception cref="System.Exception"></exception>
        public virtual void Conc(IExtObjectContainer oc)
        {
            IQuery q = oc.Query();

            q.Constrain(typeof(MultiDeleteTestCase));
            q.Descend("name").Constrain("killmefirst");
            IObjectSet objectSet = q.Execute();

            if (objectSet.Count == 0)
            {
                // already deleted by other threads
                return;
            }
            Assert.AreEqual(1, objectSet.Count);
            Thread.Sleep(1000);
            if (!objectSet.HasNext())
            {
                return;
            }
            MultiDeleteTestCase md = (MultiDeleteTestCase)objectSet.Next();

            oc.Delete(md);
            oc.Commit();
            AssertOccurrences(oc, typeof(MultiDeleteTestCase), 0);
        }
Пример #2
0
		protected override void Store()
		{
			MultiDeleteTestCase md = new MultiDeleteTestCase();
			md.name = "killmefirst";
			md.SetMembers();
			md.child = new MultiDeleteTestCase();
			md.child.SetMembers();
			Store(md);
		}
Пример #3
0
        protected override void Store()
        {
            var md = new MultiDeleteTestCase();

            md.name = "killmefirst";
            md.SetMembers();
            md.child = new MultiDeleteTestCase();
            md.child.SetMembers();
            Store(md);
        }