@Test public void CheckClientMultipleDeletesOneUndoTest() { Client second = new Client("SecondClient", null, "Last", LocalDate.of(1970, 1, 1), 2); manager.addClient(second); DeleteClientAction action = new DeleteClientAction(baseClient, manager); DeleteClientAction secondAction = new DeleteClientAction(second, manager); invoker.execute(action); invoker.execute(secondAction); invoker.undo(); assertEquals(second, manager.getClients().get(0)); assertEquals(1, manager.getClients().size()); }
@Override protected void execute() { super.execute(); manager.removeClient(client); }
DeleteClientAction extends ClientAction { @Override protected void execute() { super.execute(); manager.removeClient(client); } }
DeleteClientAction extends ClientAction { @Override protected void execute() { super.execute(); manager.removeClient(client); } DeleteClientAction(Client client, ClientManager manager); }
DeleteClientAction extends ClientAction { @Override protected void execute() { super.execute(); manager.removeClient(client); } DeleteClientAction(Client client, ClientManager manager); @Override String getExecuteText(); @Override String getUnexecuteText(); }
DeleteClientAction extends ClientAction { @Override protected void execute() { super.execute(); manager.removeClient(client); } DeleteClientAction(Client client, ClientManager manager); @Override String getExecuteText(); @Override String getUnexecuteText();  }