@Test public void CheckClinicianMultipleAddsOneUndoRedoTest() { CreateClinicianAction action = new CreateClinicianAction(baseClinician, manager); invoker.execute(action); Clinician second = new Clinician("First2", null, "Last2", "Address", Region.UNSPECIFIED.name(), null, 2, "pass"); CreateClinicianAction secondAction = new CreateClinicianAction(second, manager); invoker.execute(secondAction); invoker.undo(); assertEquals(baseClinician, manager.getClinicians().get(1)); assertEquals(2, manager.getClinicians().size()); invoker.redo(); assertEquals(baseClinician, manager.getClinicians().get(1)); assertEquals(second, manager.getClinicians().get(2)); assertEquals(3, manager.getClinicians().size()); }
@Override protected void execute() { super.execute(); manager.addClinician(clinician); }
CreateClinicianAction extends ClinicianAction { @Override protected void execute() { super.execute(); manager.addClinician(clinician); } }
CreateClinicianAction extends ClinicianAction { @Override protected void execute() { super.execute(); manager.addClinician(clinician); } CreateClinicianAction(Clinician clinician, ClinicianManager manager); }
CreateClinicianAction extends ClinicianAction { @Override protected void execute() { super.execute(); manager.addClinician(clinician); } CreateClinicianAction(Clinician clinician, ClinicianManager manager); @Override String getExecuteText(); @Override String getUnexecuteText(); }
CreateClinicianAction extends ClinicianAction { @Override protected void execute() { super.execute(); manager.addClinician(clinician); } CreateClinicianAction(Clinician clinician, ClinicianManager manager); @Override String getExecuteText(); @Override String getUnexecuteText();  }