@Test public void CheckClinicianMultipleDeletesOneUndoRedoTest() { Administrator second = new Administrator("First2", "pass"); manager.addAdministrator(second); DeleteAdministratorAction action = new DeleteAdministratorAction(baseAdministrator, manager); DeleteAdministratorAction secondAction = new DeleteAdministratorAction(second, manager); invoker.execute(action); invoker.execute(secondAction); invoker.undo(); assertEquals(second, manager.getAdministrators().get(1)); assertEquals(2, manager.getAdministrators().size()); invoker.redo(); assertEquals(1, manager.getAdministrators().size()); }
@Override protected void execute() { super.execute(); manager.removeAdministrator(administrator); }
DeleteAdministratorAction extends AdministratorAction { @Override protected void execute() { super.execute(); manager.removeAdministrator(administrator); } }
DeleteAdministratorAction extends AdministratorAction { @Override protected void execute() { super.execute(); manager.removeAdministrator(administrator); } DeleteAdministratorAction(Administrator administrator, AdministratorManager manager); }
DeleteAdministratorAction extends AdministratorAction { @Override protected void execute() { super.execute(); manager.removeAdministrator(administrator); } DeleteAdministratorAction(Administrator administrator, AdministratorManager manager); @Override String getExecuteText(); @Override String getUnexecuteText(); }
DeleteAdministratorAction extends AdministratorAction { @Override protected void execute() { super.execute(); manager.removeAdministrator(administrator); } DeleteAdministratorAction(Administrator administrator, AdministratorManager manager); @Override String getExecuteText(); @Override String getUnexecuteText();  }