예제 #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
파일: BasicTests.cs 프로젝트: mlivensp/csla
        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
파일: BasicTests.cs 프로젝트: mlivensp/csla
        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();
        }