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); }
/// <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); }
public Item(int id, UpdateDepthWithCascadingDeleteTestCase.Item item) { _id = id; _item = item; }