ActionSendSMS extends Action { @Override public void doAction(Callback callback) { boolean result = SmsCommunicatorPlugin.INSTANCE.sendNotificationToAllNumbers(text.getValue()); if (callback != null) callback.result(new PumpEnactResult().success(result).comment(result ? R.string.ok : R.string.danar_error)).run(); }  @Override int friendlyName(); @Override String shortDescription(); @Override void doAction(Callback callback); @Override Optional<Integer> icon(); @Override String toJSON(); @Override Action fromJSON(String data); @Override boolean hasDialog(); @Override void generateDialog(LinearLayout root); public InputString text; }
@Test public void doActionTest() { actionSendSMS.text = new InputString().setValue("Asd"); actionSendSMS.doAction(new Callback() { @Override public void run() { Assert.assertTrue(result.success); } }); }