Ejemplo n.º 1
0
 protected override void Store()
 {
     for (var i = 0; i < Count; i++)
     {
         var ibi = new IndexedByIdentityTestCase();
         ibi.atom = new Atom("ibi" + i);
         Store(ibi);
     }
 }
Ejemplo n.º 2
0
 protected override void Store()
 {
     for (var i = 0; i < Count; i++)
     {
         var ibi = new IndexedByIdentityTestCase();
         ibi.atom = new Atom("ibi" + i);
         Store(ibi);
     }
 }
Ejemplo n.º 3
0
        /// <exception cref="System.Exception"></exception>
        public virtual void ConcUpdate(IExtObjectContainer oc, int seq)
        {
            IQuery q = oc.Query();

            q.Constrain(typeof(IndexedByIdentityTestCase));
            IObjectSet os = q.Execute();

            Assert.AreEqual(Count, os.Count);
            while (os.HasNext())
            {
                IndexedByIdentityTestCase idi = (IndexedByIdentityTestCase)os.Next();
                idi.atom.name = "updated" + seq;
                oc.Store(idi);
                Thread.Sleep(100);
            }
        }
Ejemplo n.º 4
0
 public virtual void ConcRead(IExtObjectContainer oc)
 {
     for (int i = 0; i < Count; i++)
     {
         IQuery q = oc.Query();
         q.Constrain(typeof(Atom));
         q.Descend("name").Constrain("ibi" + i);
         IObjectSet objectSet = q.Execute();
         Assert.AreEqual(1, objectSet.Count);
         Atom child = (Atom)objectSet.Next();
         q = oc.Query();
         q.Constrain(typeof(IndexedByIdentityTestCase));
         q.Descend("atom").Constrain(child).Identity();
         objectSet = q.Execute();
         Assert.AreEqual(1, objectSet.Count);
         IndexedByIdentityTestCase ibi = (IndexedByIdentityTestCase)objectSet.Next();
         Assert.AreSame(child, ibi.atom);
     }
 }
Ejemplo n.º 5
0
        public virtual void CheckUpdate(IExtObjectContainer oc)
        {
            IQuery q = oc.Query();

            q.Constrain(typeof(IndexedByIdentityTestCase));
            IObjectSet os = q.Execute();

            Assert.AreEqual(Count, os.Count);
            string expected = null;

            while (os.HasNext())
            {
                IndexedByIdentityTestCase idi = (IndexedByIdentityTestCase)os.Next();
                if (expected == null)
                {
                    expected = idi.atom.name;
                    Assert.IsTrue(expected.StartsWith("updated"));
                    Assert.IsTrue(expected.Length > "updated".Length);
                }
                Assert.AreEqual(expected, idi.atom.name);
            }
        }