예제 #1
0
        private void TQueryB(IExtObjectContainer oc)
        {
            IObjectSet res = Query(oc, "b");

            Assert.AreEqual(1, res.Count);
            CreateIndexInheritedTestCase.CreateIndexFor ci = (CreateIndexInheritedTestCase.CreateIndexFor
                                                              )res.Next();
            Assert.AreEqual("b", ci.i_name);
        }
예제 #2
0
        private void TUpdateB(IExtObjectContainer oc)
        {
            IObjectSet res = Query(oc, "b");

            CreateIndexInheritedTestCase.CreateIndexFor ci = (CreateIndexInheritedTestCase.CreateIndexFor
                                                              )res.Next();
            ci.i_name = "j";
            oc.Store(ci);
            res = Query(oc, "b");
            Assert.AreEqual(0, res.Count);
            res = Query(oc, "j");
            Assert.AreEqual(1, res.Count);
            ci.i_name = "b";
            oc.Store(ci);
            TQueryB(oc);
        }
예제 #3
0
        private void TExpectInts(IQuery q, int[] ints, int zeroSize)
        {
            IObjectSet res = q.Execute();

            Assert.AreEqual(ints.Length + zeroSize, res.Count);
            while (res.HasNext())
            {
                CreateIndexInheritedTestCase.CreateIndexFor ci = (CreateIndexInheritedTestCase.CreateIndexFor
                                                                  )res.Next();
                for (int i = 0; i < ints.Length; i++)
                {
                    if (ints[i] == ci.i_int)
                    {
                        ints[i] = 0;
                        break;
                    }
                }
            }
            for (int i = 0; i < ints.Length; i++)
            {
                Assert.AreEqual(0, ints[i]);
            }
        }