public void TestFetch() { UnitTestContext context = GetContext(); MockEditableRoot.Fetch( MockEditableRoot.MockEditableRootId, (o, e) => { MockEditableRoot actual = e.Object; context.Assert.IsNull(e.Error); context.Assert.AreEqual(MockEditableRoot.MockEditableRootId, actual.Id); context.Assert.AreEqual("fetch", actual.DataPortalMethod); context.Assert.IsFalse(actual.IsNew); context.Assert.IsFalse(actual.IsDeleted); context.Assert.IsFalse(actual.IsDirty); context.Assert.Success(); }); context.Complete(); }
public void CloneBB() { Csla.DataPortal.ProxyTypeName = typeof(SynchronizedWcfProxy).AssemblyQualifiedName; Csla.DataPortalClient.WcfProxy.DefaultUrl = cslalighttest.Properties.Resources.RemotePortalUrl; var context = GetContext(); MockEditableRoot.Fetch( MockEditableRoot.MockEditableRootId, (o, e) => { var actual = (MockEditableRoot)e.Object; MockEditableRoot clone = actual.Clone(); context.Assert.AreEqual(actual.Id, clone.Id, "Failed to clone"); context.Assert.Success(); }); context.Complete(); }
public void When_Fetching_EditableRoot_the_object_returned_ShouldNotBe_Marked_New_Deleted_or_Dirty() { var context = GetContext(); MockEditableRoot.Fetch( MockEditableRoot.MockEditableRootId, (o, e) => { var actual = (MockEditableRoot)e.Object; context.Assert.IsNull(e.Error); context.Assert.AreEqual(MockEditableRoot.MockEditableRootId, actual.Id); context.Assert.AreEqual("fetch", actual.DataPortalMethod); context.Assert.IsFalse(actual.IsNew); context.Assert.IsFalse(actual.IsDeleted); context.Assert.IsFalse(actual.IsDirty); context.Assert.Success(); }); context.Complete(); }