@Test public void getAnswer_whenPromptHasAnswer_returnsAnswer() { GeoPointMapWidget widget = createWidget(promptWithAnswer(answer)); assertThat(widget.getAnswer().getDisplayText(), equalTo(answer.getDisplayText())); }
@Override public IAnswerData getAnswer() { if (stringAnswer == null || stringAnswer.isEmpty()) { return null; } else { return new GeoPointData(GeoWidgetUtils.getLocationParamsFromStringAnswer(stringAnswer)); } }
GeoPointMapWidget extends QuestionWidget implements BinaryDataReceiver { @Override public IAnswerData getAnswer() { if (stringAnswer == null || stringAnswer.isEmpty()) { return null; } else { return new GeoPointData(GeoWidgetUtils.getLocationParamsFromStringAnswer(stringAnswer)); } } }
GeoPointMapWidget extends QuestionWidget implements BinaryDataReceiver { @Override public IAnswerData getAnswer() { if (stringAnswer == null || stringAnswer.isEmpty()) { return null; } else { return new GeoPointData(GeoWidgetUtils.getLocationParamsFromStringAnswer(stringAnswer)); } } GeoPointMapWidget(Context context, QuestionDetails questionDetails,
                             QuestionDef questionDef, WaitingForDataRegistry waitingForDataRegistry); }
GeoPointMapWidget extends QuestionWidget implements BinaryDataReceiver { @Override public IAnswerData getAnswer() { if (stringAnswer == null || stringAnswer.isEmpty()) { return null; } else { return new GeoPointData(GeoWidgetUtils.getLocationParamsFromStringAnswer(stringAnswer)); } } GeoPointMapWidget(Context context, QuestionDetails questionDetails,
                             QuestionDef questionDef, WaitingForDataRegistry waitingForDataRegistry); @Override IAnswerData getAnswer(); @Override void clearAnswer(); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress(); @Override void setBinaryData(Object answer); }
GeoPointMapWidget extends QuestionWidget implements BinaryDataReceiver { @Override public IAnswerData getAnswer() { if (stringAnswer == null || stringAnswer.isEmpty()) { return null; } else { return new GeoPointData(GeoWidgetUtils.getLocationParamsFromStringAnswer(stringAnswer)); } } GeoPointMapWidget(Context context, QuestionDetails questionDetails,
                             QuestionDef questionDef, WaitingForDataRegistry waitingForDataRegistry); @Override IAnswerData getAnswer(); @Override void clearAnswer(); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress(); @Override void setBinaryData(Object answer); static final String LOCATION; static final String ACCURACY_THRESHOLD; static final String READ_ONLY; static final String DRAGGABLE_ONLY; static final double DEFAULT_LOCATION_ACCURACY; }