public virtual void TestNotIdentity() { IQuery q = NewQuery(); q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase(( byte)1)); IObjectSet set = q.Execute(); Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase identityConstraint = (Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase)set.Next(); identityConstraint.i_byte = 102; q = NewQuery(); q.Constrain(identityConstraint).Identity().Not(); identityConstraint.i_byte = 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.STByteTestCase(( byte)1)); IObjectSet set = q.Execute(); Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase identityConstraint = (Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase)set.Next(); identityConstraint.i_byte = 102; q = NewQuery(); q.Constrain(identityConstraint).Identity(); identityConstraint.i_byte = 1; SodaTestUtil.ExpectOne(q, _array[1]); }