@Test public void checkRequestWasAddedThenUndoneTest() { TransplantRequest request = new TransplantRequest(testClient, Organ.HEART); Action action = new AddTransplantRequestAction(testClient, request, manager); invoker.execute(action); assertTrue(testClient.getTransplantRequests().contains(request)); invoker.undo(); assertFalse(testClient.getTransplantRequests().contains(request)); }
@Override protected void execute() { super.execute(); client.addTransplantRequest(request); manager.applyChangesTo(client); }
AddTransplantRequestAction extends ClientAction { @Override protected void execute() { super.execute(); client.addTransplantRequest(request); manager.applyChangesTo(client); } }
AddTransplantRequestAction extends ClientAction { @Override protected void execute() { super.execute(); client.addTransplantRequest(request); manager.applyChangesTo(client); } AddTransplantRequestAction(Client client, TransplantRequest request, ClientManager manager); }
AddTransplantRequestAction extends ClientAction { @Override protected void execute() { super.execute(); client.addTransplantRequest(request); manager.applyChangesTo(client); } AddTransplantRequestAction(Client client, TransplantRequest request, ClientManager manager); @Override String getExecuteText(); @Override String getUnexecuteText(); }
AddTransplantRequestAction extends ClientAction { @Override protected void execute() { super.execute(); client.addTransplantRequest(request); manager.applyChangesTo(client); } AddTransplantRequestAction(Client client, TransplantRequest request, ClientManager manager); @Override String getExecuteText(); @Override String getUnexecuteText();  }