コード例 #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);
        }