예제 #1
0
        public void Mods_followed_by_delete_result_in_delete() {
            ActionStack actionStack = new ActionStack();

            //mod
            actionStack.PushDelete();
            actionStack.PushAdd();

            //mod
            actionStack.PushDelete();
            actionStack.PushAdd();

            //delete
            actionStack.PushDelete();
            Assert.IsFalse(actionStack.IsAdd);
            Assert.IsTrue(actionStack.IsDelete);
        }
예제 #2
0
        public void Create_mod_delete_results_in_no_op() {
            ActionStack actionStack = new ActionStack();

            //create
            actionStack.PushAdd();

            //mod
            actionStack.PushDelete();
            actionStack.PushAdd();

            //delete
            actionStack.PushDelete();
            Assert.IsFalse(actionStack.IsAdd);
            Assert.IsFalse(actionStack.IsDelete);
        }
예제 #3
0
        public void Delete_create_delete_results_in_delete() {
            ActionStack actionStack = new ActionStack();

            //delete
            actionStack.PushDelete();

            //create
            actionStack.PushAdd();

            //delete
            actionStack.PushDelete();
            Assert.IsFalse(actionStack.IsAdd);
            Assert.IsTrue(actionStack.IsDelete);
        }
예제 #4
0
        public void Delete_create_mod_results_in_add_and_delete() {
            ActionStack actionStack = new ActionStack();

            //delete
            actionStack.PushDelete();

            //create
            actionStack.PushAdd();

            //mod
            actionStack.PushDelete();
            actionStack.PushAdd();
            Assert.IsTrue(actionStack.IsAdd);
            Assert.IsTrue(actionStack.IsDelete);
        }