示例#1
0
        public virtual void TestNotIdentity()
        {
            IQuery q = NewQuery();

            q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STIntegerWUTestCase
                            (1));
            IObjectSet set = q.Execute();

            Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STIntegerWUTestCase identityConstraint
                = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STIntegerWUTestCase)set.Next
                      ();
            identityConstraint.i_int = 9080;
            q = NewQuery();
            q.Constrain(identityConstraint).Identity().Not();
            identityConstraint.i_int = 1;
            Expect(q, new int[] { 0, 2, 3 });
        }
示例#2
0
        public virtual void TestIdentity()
        {
            IQuery q = NewQuery();

            q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STIntegerWUTestCase
                            (1));
            IObjectSet set = q.Execute();

            Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STIntegerWUTestCase identityConstraint
                = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STIntegerWUTestCase)set.Next
                      ();
            identityConstraint.i_int = 9999;
            q = NewQuery();
            q.Constrain(identityConstraint).Identity();
            identityConstraint.i_int = 1;
            SodaTestUtil.ExpectOne(q, _array[1]);
        }
示例#3
0
 public void Evaluate(ICandidate candidate)
 {
     Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STIntegerWUTestCase sti = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STIntegerWUTestCase
                                                                                  )candidate.GetObject();
     candidate.Include((((int)sti.i_int) + 2) > 100);
 }