@Test public void getAnswer_whenPromptHasAnswer_returnsAnswer() { TriggerWidget widget = createWidget(promptWithAnswer(new StringData("OK"))); assertThat(widget.getAnswer().getDisplayText(), equalTo("OK")); }
@Override public IAnswerData getAnswer() { return triggerButton.isChecked() ? new StringData(OK_TEXT) : null; }
TriggerWidget extends QuestionWidget { @Override public IAnswerData getAnswer() { return triggerButton.isChecked() ? new StringData(OK_TEXT) : null; } }
TriggerWidget extends QuestionWidget { @Override public IAnswerData getAnswer() { return triggerButton.isChecked() ? new StringData(OK_TEXT) : null; } TriggerWidget(Context context, QuestionDetails prompt); }
TriggerWidget extends QuestionWidget { @Override public IAnswerData getAnswer() { return triggerButton.isChecked() ? new StringData(OK_TEXT) : null; } TriggerWidget(Context context, QuestionDetails prompt); @Override void clearAnswer(); @Override IAnswerData getAnswer(); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress(); CheckBox getCheckBox(); }
TriggerWidget extends QuestionWidget { @Override public IAnswerData getAnswer() { return triggerButton.isChecked() ? new StringData(OK_TEXT) : null; } TriggerWidget(Context context, QuestionDetails prompt); @Override void clearAnswer(); @Override IAnswerData getAnswer(); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress(); CheckBox getCheckBox();  }