Пример #1
0
 protected override void Store()
 {
     CascadeDeleteFalseTestCase.Item item = new CascadeDeleteFalseTestCase.Item();
     item.h1 = new CascadeDeleteFalseTestCase.CascadeDeleteFalseHelper();
     item.h2 = new CascadeDeleteFalseTestCase.CascadeDeleteFalseHelper();
     item.h3 = new CascadeDeleteFalseTestCase.CascadeDeleteFalseHelper();
     Store(item);
 }
Пример #2
0
		protected override void Store()
		{
			CascadeDeleteFalseTestCase.Item item = new CascadeDeleteFalseTestCase.Item();
			item.h1 = new CascadeDeleteFalseTestCase.CascadeDeleteFalseHelper();
			item.h2 = new CascadeDeleteFalseTestCase.CascadeDeleteFalseHelper();
			item.h3 = new CascadeDeleteFalseTestCase.CascadeDeleteFalseHelper();
			Store(item);
		}
Пример #3
0
        /// <exception cref="System.Exception"></exception>
        public virtual void ConcDelete(IExtObjectContainer oc)
        {
            IObjectSet os = oc.Query(typeof(CascadeDeleteFalseTestCase.Item));

            if (os.Count == 0)
            {
                // the object has been deleted
                return;
            }
            if (!os.HasNext())
            {
                // object can be deleted after query
                return;
            }
            CascadeDeleteFalseTestCase.Item cdf = (CascadeDeleteFalseTestCase.Item)os.Next();
            // sleep 1000 ms, waiting for other threads.
            // Thread.sleep(500);
            oc.Delete(cdf);
            oc.Commit();
            AssertOccurrences(oc, typeof(CascadeDeleteFalseTestCase.Item), 0);
            AssertOccurrences(oc, typeof(CascadeDeleteFalseTestCase.CascadeDeleteFalseHelper)
                              , 1);
        }