public void CreateGenRoot() { Csla.ApplicationContext.GlobalContext.Clear(); GenRoot root; root = GenRoot.NewRoot(); Assert.IsNotNull(root); Assert.AreEqual("<new>", root.Data); Assert.AreEqual("Created", Csla.ApplicationContext.GlobalContext["GenRoot"]); Assert.AreEqual(true, root.IsNew); Assert.AreEqual(false, root.IsDeleted); Assert.AreEqual(true, root.IsDirty); }
public void InheritanceUndo() { Csla.ApplicationContext.GlobalContext.Clear(); GenRoot root; root = GenRoot.NewRoot(); root.BeginEdit(); root.Data = "abc"; root.CancelEdit(); Csla.ApplicationContext.GlobalContext.Clear(); root = GenRoot.NewRoot(); root.BeginEdit(); root.Data = "abc"; root.ApplyEdit(); }
public void CreateGenRoot() { #pragma warning disable CS0618 // Type or member is obsolete Csla.ApplicationContext.GlobalContext.Clear(); #pragma warning restore CS0618 // Type or member is obsolete GenRoot root; root = GenRoot.NewRoot(); Assert.IsNotNull(root); Assert.AreEqual("<new>", root.Data); #pragma warning disable CS0618 // Type or member is obsolete Assert.AreEqual("Created", Csla.ApplicationContext.GlobalContext["GenRoot"]); #pragma warning restore CS0618 // Type or member is obsolete Assert.AreEqual(true, root.IsNew); Assert.AreEqual(false, root.IsDeleted); Assert.AreEqual(true, root.IsDirty); }
public void InheritanceUndo() { #pragma warning disable CS0618 // Type or member is obsolete Csla.ApplicationContext.GlobalContext.Clear(); #pragma warning restore CS0618 // Type or member is obsolete GenRoot root; root = GenRoot.NewRoot(); root.BeginEdit(); root.Data = "abc"; root.CancelEdit(); #pragma warning disable CS0618 // Type or member is obsolete Csla.ApplicationContext.GlobalContext.Clear(); #pragma warning restore CS0618 // Type or member is obsolete root = GenRoot.NewRoot(); root.BeginEdit(); root.Data = "abc"; root.ApplyEdit(); }