public void DeleteNewRoot() { Csla.ApplicationContext.GlobalContext.Clear(); Csla.Test.Basic.Root root = Csla.Test.Basic.Root.NewRoot(); Csla.ApplicationContext.GlobalContext.Clear(); root.Delete(); Assert.AreEqual(true, root.IsNew); Assert.AreEqual(true, root.IsDeleted); Assert.AreEqual(true, root.IsDirty); root = root.Save(); Assert.IsNotNull(root); Assert.AreEqual(null, Csla.ApplicationContext.GlobalContext["Root"]); Assert.AreEqual(true, root.IsNew); Assert.AreEqual(false, root.IsDeleted); Assert.AreEqual(true, root.IsDirty); }
public void DeleteNewRoot() { TestResults.Reinitialise(); Csla.Test.Basic.Root root = NewRoot(); TestResults.Reinitialise(); root.Delete(); Assert.AreEqual(true, root.IsNew); Assert.AreEqual(true, root.IsDeleted); Assert.AreEqual(true, root.IsDirty); root = root.Save(); Assert.IsNotNull(root); Assert.AreEqual("", TestResults.GetResult("Root")); Assert.AreEqual(true, root.IsNew); Assert.AreEqual(false, root.IsDeleted); Assert.AreEqual(true, root.IsDirty); }