public virtual void TestRetrieve() { PlainObjectTestCase.Item itemOne = RetrieveItem("one"); Assert.IsNotNull(itemOne._plainObject); Assert.IsTrue(Db().IsStored(itemOne._plainObject)); PlainObjectTestCase.Item itemTwo = RetrieveItem("two"); Assert.AreSame(itemOne._plainObject, itemTwo._plainObject); }
/// <exception cref="System.Exception"></exception> protected override void Store() { object plainObject = new object(); PlainObjectTestCase.Item item = new PlainObjectTestCase.Item("one", plainObject); Store(item); Assert.IsTrue(Db().IsStored(item._plainObject)); Store(new PlainObjectTestCase.Item("two", plainObject)); }
/// <exception cref="System.Exception"></exception> protected override void Store() { object plainObject = new object(); PlainObjectTestCase.Item item = new PlainObjectTestCase.Item("one", plainObject); Store(item); Assert.IsTrue(Db().IsStored(item._plainObject)); Store(new PlainObjectTestCase.Item("two", plainObject)); }
public virtual void TestIdentityQuery() { PlainObjectTestCase.Item itemOne = RetrieveItem("one"); object plainObject = itemOne._plainObject; IQuery q = NewQuery(typeof(PlainObjectTestCase.Item)); q.Descend("_plainObject").Constrain(plainObject).Identity(); IObjectSet objectSet = q.Execute(); Assert.AreEqual(2, objectSet.Count); }
public virtual void _testEvaluationQuery() { // The evaluation doesn't work in C/S mode // because TransportObjectContainer#storeInteral // never gets a chance to intercept. PlainObjectTestCase.Item itemOne = RetrieveItem("one"); object plainObject = itemOne._plainObject; IQuery q = NewQuery(typeof(PlainObjectTestCase.Item)); q.Constrain(new _IEvaluation_64(plainObject)); IObjectSet objectSet = q.Execute(); Assert.AreEqual(2, objectSet.Count); }
public void Evaluate(ICandidate candidate) { PlainObjectTestCase.Item item = (PlainObjectTestCase.Item)candidate.GetObject(); candidate.Include(item._plainObject == plainObject); }
public virtual void TestDelete() { PlainObjectTestCase.Item itemOne = RetrieveItem("one"); Db().Delete(itemOne); }