Exemplo n.º 1
0
        private void TstObjectUpdate()
        {
            SPCChild child = new SPCChild("c1");

            A().Provider().StoreNew(child);
            A().Provider().Commit();
            StartReplication();
            SPCChild reloaded = GetOneChildFromA();
            long     oldVer   = A().Provider().ProduceReference(reloaded, null, null).Version();

            CommitReplication();
            SPCChild reloaded2 = GetOneChildFromA();

            reloaded2.SetName("c3");
            //System.out.println("==============BEGIN DEBUG");
            A().Provider().Update(reloaded2);
            A().Provider().Commit();
            //System.out.println("==============END DEBUG");
            StartReplication();
            SPCChild reloaded3 = GetOneChildFromA();
            long     newVer    = A().Provider().ProduceReference(reloaded3, null, null).Version();

            CommitReplication();
            Assert.IsGreater(oldVer, newVer);
        }
Exemplo n.º 2
0
        private void ModifyInA()
        {
            SPCChild child = GetTheObject(A());

            child.SetName("c3");
            A().Provider().Update(child);
            A().Provider().Commit();
            EnsureNames(A(), "c3");
        }
        private void ModifyInProviderB()
        {
            SPCParent parent = (SPCParent)GetOneInstance(B(), typeof(SPCParent));

            parent.SetName(ModifiedInB);
            SPCChild child = parent.GetChild();

            child.SetName(ModifiedInB);
            B().Provider().Update(parent);
            B().Provider().Update(child);
            B().Provider().Commit();
            EnsureNames(B(), ModifiedInB, ModifiedInB);
        }
Exemplo n.º 4
0
        private void ModifyParentAndChildInProviderA()
        {
            SPCParent parent = (SPCParent)GetOneInstance(A(), typeof(SPCParent));

            parent.SetName("p3");
            SPCChild child = parent.GetChild();

            child.SetName("c3");
            A().Provider().Update(parent);
            A().Provider().Update(child);
            A().Provider().Commit();
            EnsureNames(A(), "p3", "c3");
        }