public void CanUndoWhenACommandHasBeenExecuted() { var commandStack = new CommandStack(); var mockCommand = new Mock<ICommand>(); commandStack.Execute(mockCommand.Object); Assert.IsTrue(commandStack.CanUndo()); }
public void CanNotUndoWhenNoCommandsHaveBeenExecuted() { var commandStack = new CommandStack(); Assert.IsFalse(commandStack.CanUndo()); }