public virtual void TestNotIdentity() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STIntegerTestCase (1)); IObjectSet set = q.Execute(); Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STIntegerTestCase identityConstraint = (Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STIntegerTestCase)set.Next( ); identityConstraint.i_int = 9080; q = NewQuery(); q.Constrain(identityConstraint).Identity().Not(); identityConstraint.i_int = 1; Expect(q, new int[] { 0, 2, 3 }); }
public virtual void TestIdentity() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STIntegerTestCase (1)); IObjectSet set = q.Execute(); Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STIntegerTestCase identityConstraint = (Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STIntegerTestCase)set.Next( ); identityConstraint.i_int = 9999; q = NewQuery(); q.Constrain(identityConstraint).Identity(); identityConstraint.i_int = 1; SodaTestUtil.ExpectOne(q, _array[1]); }