Beispiel #1
0
 private void UndoCommand(IInputHandler argsHandler)
 {
     if (_document.CanUndo())
     {
         _document.Undo();
     }
     else
     {
         _out.WriteLine("Can't Undo");
     }
 }
Beispiel #2
0
 public void Execute(string commandData, TextWriter textWriter)
 {
     if (_document.CanUndo())
     {
         _document.Undo();
     }
     else
     {
         textWriter.WriteLine(Constants.IMPOSSIBLE_TO_UNDO);
     }
 }
Beispiel #3
0
 public void CanUndo_WithEmptyHistory_ShouldReturnFalse()
 {
     Assert.IsFalse(_document.CanUndo());
 }