Exemple #1
0
        public virtual void TestConstraints()
        {
            IQuery q = NewQuery();

            q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase((
                                                                                                byte)1));
            q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Classes.Simple.STByteTestCase((
                                                                                                byte)0));
            IConstraints cs = q.Constraints();

            IConstraint[] csa = cs.ToArray();
            if (csa.Length != 2)
            {
                Assert.Fail("Constraints not returned");
            }
        }
Exemple #2
0
        public virtual void TestConstraints()
        {
            IQuery q = NewQuery();

            q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STStringUTestCase
                            ("aaa"));
            q.Constrain(new Db4objects.Db4o.Tests.Common.Soda.Wrapper.Untyped.STStringUTestCase
                            ("bbb"));
            IConstraints cs = q.Constraints();

            IConstraint[] csa = cs.ToArray();
            if (csa.Length != 2)
            {
                Assert.Fail("Constraints not returned");
            }
        }