Пример #1
0
 @Override
 public void redo() throws Exception {
   command.execute();
   command.undo();
   command.redo();
   verify(container, times(2)).addCard(card);
 }
Пример #2
0
 @Override
 public void undo() throws Exception {
   assertThat(command.canUndo(), is(false));
   command.execute();
   assertThat(command.canUndo(), is(true));
   command.undo();
   verify(container).removeCard(card);
 }
Пример #3
0
 @Override
 public void execute() throws Exception {
   command.execute();
   verify(container).addCard(card);
 }