示例#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);
        }
示例#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();
        }
示例#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);
        }
示例#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();
        }