Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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();
        }