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

            q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STCharTestCase((
                                                                                                char)1));
            IObjectSet set = q.Execute();

            Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STCharTestCase identityConstraint
                = (Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STCharTestCase)set.Next();
            identityConstraint.i_char = (char)9080;
            q = NewQuery();
            q.Constrain(identityConstraint).Identity().Not();
            identityConstraint.i_char = (char)1;
            Expect(q, new int[] { 0, 2, 3 });
        }
Esempio n. 2
0
        public virtual void TestIdentity()
        {
            IQuery q = NewQuery();

            q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STCharTestCase((
                                                                                                char)1));
            IObjectSet set = q.Execute();

            Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STCharTestCase identityConstraint
                = (Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STCharTestCase)set.Next();
            identityConstraint.i_char = (char)9999;
            q = NewQuery();
            q.Constrain(identityConstraint).Identity();
            identityConstraint.i_char = (char)1;
            SodaTestUtil.ExpectOne(q, _array[1]);
        }