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