@Test public void clearAnswer_setsFileAsideForDeleting() { FormEntryPrompt prompt = promptWithAnswer(new StringData(FILE_PATH)); when(prompt.getIndex()).thenReturn(formIndex); AudioWidget widget = createWidget(prompt); widget.clearAnswer(); assertThat(questionMediaManager.originalFiles.get("questionIndex"), equalTo(widget.getInstanceFolder() + File.separator + "blah.mp3")); }
@Override public void clearAnswer() { deleteFile(); audioController.hidePlayer(); widgetValueChanged(); }
AudioWidget extends QuestionWidget implements FileWidget, BinaryDataReceiver { @Override public void clearAnswer() { deleteFile(); audioController.hidePlayer(); widgetValueChanged(); } }
AudioWidget extends QuestionWidget implements FileWidget, BinaryDataReceiver { @Override public void clearAnswer() { deleteFile(); audioController.hidePlayer(); widgetValueChanged(); } 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 void clearAnswer() { deleteFile(); audioController.hidePlayer(); widgetValueChanged(); } 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 void clearAnswer() { deleteFile(); audioController.hidePlayer(); widgetValueChanged(); } 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();  }