use of org.odk.collect.android.audio.AudioButton in project collect by opendatakit.
the class QuestionWidgetTest method whenQuestionHasAudio_audioButtonUsesIndexAsClipID.
@Test
public void whenQuestionHasAudio_audioButtonUsesIndexAsClipID() throws Exception {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withIndex("i am index").withAudioURI("ref").build();
WidgetTestActivity activity = CollectHelpers.createThemedActivity(WidgetTestActivity.class);
TestWidget widget = new TestWidget(activity, new QuestionDetails(prompt));
AudioButton audioButton = widget.getAudioVideoImageTextLabel().findViewById(R.id.audioButton);
verify(audioHelper).setAudio(audioButton, new Clip("i am index", "blah.mp3"));
}
Aggregations