示例#1
0
        private UpdateDepthWithCascadingDeleteTestCase.Item QueryItemByID(int id)
        {
            IQuery query = NewQuery(typeof(UpdateDepthWithCascadingDeleteTestCase.Item));

            query.Descend("_id").Constrain(id);
            IObjectSet result = query.Execute();

            Assert.IsTrue(result.HasNext());
            UpdateDepthWithCascadingDeleteTestCase.Item item = ((UpdateDepthWithCascadingDeleteTestCase.Item
                                                                 )result.Next());
            return(item);
        }
示例#2
0
        /// <exception cref="System.Exception"></exception>
        public virtual void TestUpdateDepth()
        {
            UpdateDepthWithCascadingDeleteTestCase.Item item = QueryItemByID(RootId);
            int changedRootID = 42;

            item._id       = changedRootID;
            item._item._id = 43;
            Store(item);
            Reopen();
            UpdateDepthWithCascadingDeleteTestCase.Item changed = QueryItemByID(changedRootID
                                                                                );
            Assert.AreEqual(ChildId, changed._item._id);
        }
示例#3
0
 public Item(int id, UpdateDepthWithCascadingDeleteTestCase.Item item)
 {
     _id   = id;
     _item = item;
 }
			public Item(int id, UpdateDepthWithCascadingDeleteTestCase.Item item)
			{
				_id = id;
				_item = item;
			}