@Test public void getAnswer_whenPromptHasAnswer_returnsAnswer() { AudioWidget widget = createWidget(promptWithAnswer(new StringData(FILE_PATH))); assertThat(widget.getAnswer().getDisplayText(), equalTo(FILE_PATH)); }
@Override public IAnswerData getAnswer() { if (binaryName != null) { return new StringData(binaryName); } else { return null; } }
AudioWidget extends QuestionWidget implements FileWidget, BinaryDataReceiver { @Override public IAnswerData getAnswer() { if (binaryName != null) { return new StringData(binaryName); } else { return null; } } }
AudioWidget extends QuestionWidget implements FileWidget, BinaryDataReceiver { @Override public IAnswerData getAnswer() { if (binaryName != null) { return new StringData(binaryName); } else { return null; } } AudioWidget(Context context, QuestionDetails prompt, QuestionMediaManager questionMediaManager, WaitingForDataRegistry waitingForDataRegistry);   AudioWidget(Context context, QuestionDetails questionDetails, @NonNull FileUtil fileUtil, @NonNull MediaUtil mediaUtil, @NonNull AudioControllerView audioController,
                QuestionMediaManager questionMediaManager, WaitingForDataRegistry waitingForDataRegistry, AudioHelper audioHelper, ActivityAvailability activityAvailability); }
AudioWidget extends QuestionWidget implements FileWidget, BinaryDataReceiver { @Override public IAnswerData getAnswer() { if (binaryName != null) { return new StringData(binaryName); } else { return null; } } AudioWidget(Context context, QuestionDetails prompt, QuestionMediaManager questionMediaManager, WaitingForDataRegistry waitingForDataRegistry);   AudioWidget(Context context, QuestionDetails questionDetails, @NonNull FileUtil fileUtil, @NonNull MediaUtil mediaUtil, @NonNull AudioControllerView audioController,
                QuestionMediaManager questionMediaManager, WaitingForDataRegistry waitingForDataRegistry, AudioHelper audioHelper, ActivityAvailability activityAvailability); @Override void deleteFile(); @Override void clearAnswer(); @Override IAnswerData getAnswer(); @Override void setBinaryData(Object object); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress(); }
AudioWidget extends QuestionWidget implements FileWidget, BinaryDataReceiver { @Override public IAnswerData getAnswer() { if (binaryName != null) { return new StringData(binaryName); } else { return null; } } AudioWidget(Context context, QuestionDetails prompt, QuestionMediaManager questionMediaManager, WaitingForDataRegistry waitingForDataRegistry);   AudioWidget(Context context, QuestionDetails questionDetails, @NonNull FileUtil fileUtil, @NonNull MediaUtil mediaUtil, @NonNull AudioControllerView audioController,
                QuestionMediaManager questionMediaManager, WaitingForDataRegistry waitingForDataRegistry, AudioHelper audioHelper, ActivityAvailability activityAvailability); @Override void deleteFile(); @Override void clearAnswer(); @Override IAnswerData getAnswer(); @Override void setBinaryData(Object object); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress();  }