Exemple #1
0
 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));
		}
Exemple #3
0
        /// <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));
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
 public void Evaluate(ICandidate candidate)
 {
     PlainObjectTestCase.Item item = (PlainObjectTestCase.Item)candidate.GetObject();
     candidate.Include(item._plainObject == plainObject);
 }
Exemple #7
0
 public virtual void TestDelete()
 {
     PlainObjectTestCase.Item itemOne = RetrieveItem("one");
     Db().Delete(itemOne);
 }