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); }
private void EnsureNames(IDrsProviderFixture fixture, string childName) { EnsureOneInstance(fixture, typeof(SPCChild)); SPCChild child = GetTheObject(fixture); Assert.AreEqual(childName, child.GetName()); }
private void StoreInA() { SPCChild child = new SPCChild("c1"); A().Provider().StoreNew(child); A().Provider().Commit(); EnsureNames(A(), "c1"); }
private void ModifyInA() { SPCChild child = GetTheObject(A()); child.SetName("c3"); A().Provider().Update(child); A().Provider().Commit(); EnsureNames(A(), "c3"); }
private void StoreInA() { string name = "c1"; SPCChild child = CreateChildObject(name); A().Provider().StoreNew(child); A().Provider().Commit(); EnsureNames(A(), "c1"); }
private void StoreParentAndChildToProviderA() { SPCChild child = new SPCChild(InA); SPCParent parent = new SPCParent(child, InA); A().Provider().StoreNew(parent); A().Provider().Commit(); EnsureNames(A(), InA, InA); }
private void Replicate() { SPCChild child = new SPCChild("c1"); SPCParent parent = new SPCParent(child, "p1"); A().Provider().StoreNew(parent); A().Provider().Commit(); ReplicateAll(A().Provider(), B().Provider()); }
private SPCChild StoreInA() { string name = "c1"; SPCChild child = CreateChildObject(name); A().Provider().StoreNew(child); A().Provider().Commit(); return(child); }
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); }
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"); }
public virtual void Test() { SPCChild child = StoreInA(); Replicate(); IReplicationReference @ref = A().Provider().ProduceReference(child); B().Provider().ClearAllReferences(); IDrsUUID expectedUuid = @ref.Uuid(); IReplicationReference referenceByUUID = B().Provider().ProduceReferenceByUUID(expectedUuid , null); Assert.IsNotNull(referenceByUUID); IDrsUUID actualUuid = referenceByUUID.Uuid(); Assert.AreEqual(expectedUuid.GetLongPart(), actualUuid.GetLongPart()); }