예제 #1
0
        public void CanUndoWhenACommandHasBeenExecuted()
        {
            var commandStack = new CommandStack();

            var mockCommand = new Mock<ICommand>();

            commandStack.Execute(mockCommand.Object);

            Assert.IsTrue(commandStack.CanUndo());
        }
예제 #2
0
        public void CanNotUndoWhenNoCommandsHaveBeenExecuted()
        {
            var commandStack = new CommandStack();

            Assert.IsFalse(commandStack.CanUndo());
        }