ActionProfileSwitchPercent extends Action { @Override public void doAction(Callback callback) { ProfileFunctions.doProfileSwitch((int) duration.getValue(), (int) pct.getValue(), 0); if (callback != null) callback.result(new PumpEnactResult().success(true).comment(R.string.ok)).run(); } ActionProfileSwitchPercent(); @Override int friendlyName(); @Override String shortDescription(); @Override void doAction(Callback callback); @Override void generateDialog(LinearLayout root); @Override boolean hasDialog(); @Override String toJSON(); @Override Action fromJSON(String data); @Override Optional<Integer> icon();  }
@Test public void doActionTest() { actionProfileSwitchPercent.doAction(new Callback() { @Override public void run() { Assert.assertTrue(result.success); } }); }