@Test public void ModifyStringValidUndoTest() throws Exception { SettableItem testItem = new SettableItem(); testItem.setString("initVal"); ModifyObjectByFieldAction action = new ModifyObjectByFieldAction(testItem, "string", testItem.getString(), "newVal"); invoker.execute(action); invoker.undo(); assertEquals("initVal", testItem.getString()); }
@Override public void execute() { runChange(newValue); }
ModifyObjectByFieldAction extends Action { @Override public void execute() { runChange(newValue); } }
ModifyObjectByFieldAction extends Action { @Override public void execute() { runChange(newValue); } ModifyObjectByFieldAction(Object toModify, String field, Object oldValue, Object newValue);  ModifyObjectByFieldAction(Object toModify, String field, Object oldValue, Object newValue, boolean isPrivate);  ModifyObjectByFieldAction(Object toModify, String field, Object newValue); }
ModifyObjectByFieldAction extends Action { @Override public void execute() { runChange(newValue); } ModifyObjectByFieldAction(Object toModify, String field, Object oldValue, Object newValue);  ModifyObjectByFieldAction(Object toModify, String field, Object oldValue, Object newValue, boolean isPrivate);  ModifyObjectByFieldAction(Object toModify, String field, Object newValue); @Override void execute(); @Override void unExecute(); @Override String getExecuteText(); @Override String getUnexecuteText(); @Override Object getModifiedObject(); }
ModifyObjectByFieldAction extends Action { @Override public void execute() { runChange(newValue); } ModifyObjectByFieldAction(Object toModify, String field, Object oldValue, Object newValue);  ModifyObjectByFieldAction(Object toModify, String field, Object oldValue, Object newValue, boolean isPrivate);  ModifyObjectByFieldAction(Object toModify, String field, Object newValue); @Override void execute(); @Override void unExecute(); @Override String getExecuteText(); @Override String getUnexecuteText(); @Override Object getModifiedObject();  }