public virtual void TestIdentity() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase ((char)1)); IObjectSet set = q.Execute(); Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase identityConstraint = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase)set.Next( ); identityConstraint.i_char = (char)9999; q = NewQuery(); q.Constrain(identityConstraint).Identity(); identityConstraint.i_char = (char)1; SodaTestUtil.ExpectOne(q, _array[1]); }
public virtual void TestNotIdentity() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase ((char)1)); IObjectSet set = q.Execute(); Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase identityConstraint = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase)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 }); }
public void Evaluate(ICandidate candidate) { Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase sts = (Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STCharWUTestCase )candidate.GetObject(); candidate.Include((((char)sts.i_char) + 2) > 100); }