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 void ModifyParentInProviderB() { SPCParent parent = (SPCParent)GetOneInstance(B(), typeof(SPCParent)); parent.SetName("p2"); B().Provider().Update(parent); B().Provider().Commit(); EnsureNames(B(), "p2", "c1"); }
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"); }
private void EnsureNames(IDrsProviderFixture fixture, string parentName, string childName ) { EnsureOneInstanceOfParentAndChild(fixture); SPCParent parent = (SPCParent)GetOneInstance(fixture, typeof(SPCParent)); if (!parent.GetName().Equals(parentName)) { Sharpen.Runtime.Out.WriteLine("expected = " + parentName); Sharpen.Runtime.Out.WriteLine("actual = " + parent.GetName()); } Assert.AreEqual(parent.GetName(), parentName); Assert.AreEqual(childName, parent.GetChild().GetName()); }