Ejemplo n.º 1
0
        public virtual void TestNotIdentity()
        {
            IQuery q = NewQuery();

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

            Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STShortWUTestCase identityConstraint
                = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STShortWUTestCase)set.Next
                      ();
            identityConstraint.i_short = (short)9080;
            q = NewQuery();
            q.Constrain(identityConstraint).Identity().Not();
            identityConstraint.i_short = (short)1;
            Expect(q, new int[] { 0, 2, 3 });
        }
Ejemplo n.º 2
0
        public virtual void TestIdentity()
        {
            IQuery q = NewQuery();

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

            Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STShortWUTestCase identityConstraint
                = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STShortWUTestCase)set.Next
                      ();
            identityConstraint.i_short = (short)9999;
            q = NewQuery();
            q.Constrain(identityConstraint).Identity();
            identityConstraint.i_short = (short)1;
            SodaTestUtil.ExpectOne(q, _array[1]);
        }
Ejemplo n.º 3
0
 public void Evaluate(ICandidate candidate)
 {
     Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STShortWUTestCase sts = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STShortWUTestCase
                                                                                )candidate.GetObject();
     candidate.Include((((short)sts.i_short) + 2) > 100);
 }