@Test public void whenQuestionHasAudio_audioButtonUsesIndexAsClipID() throws Exception { String reference = createMockReference(referenceManager, "file: FormEntryPrompt prompt = new MockFormEntryPromptBuilder() .withIndex("i am index") .withAudioURI("file: .build(); TestScreenContextActivity activity = RobolectricHelpers.createThemedActivity(TestScreenContextActivity.class); TestWidget widget = new TestWidget(activity, new QuestionDetails(prompt, "formAnalyticsID")); AudioButton audioButton = widget.getAudioVideoImageTextLabel().findViewById(R.id.audioButton); verify(audioHelper).setAudio(audioButton, new Clip("i am index", reference)); }
public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; }
QuestionWidget extends RelativeLayout implements Widget { public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; } }
QuestionWidget extends RelativeLayout implements Widget { public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; } QuestionWidget(Context context, QuestionDetails questionDetails); }
QuestionWidget extends RelativeLayout implements Widget { public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; } QuestionWidget(Context context, QuestionDetails questionDetails); void release(); static boolean isRTL(); TextView getHelpTextView(); FormEntryPrompt getFormEntryPrompt(); QuestionDetails getQuestionDetails(); void recycleDrawables(); void setFocus(Context context); abstract void setOnLongClickListener(OnLongClickListener l); boolean suppressFlingGesture(MotionEvent e1, MotionEvent e2, float velocityX,
                                        float velocityY); Bundle getState(); Bundle getCurrentState(); void cancelLongPress(); void showWarning(String warningBody); void stopAudio(); @Override final void waitForData(); @Override final void cancelWaitingForData(); @Override final boolean isWaitingForData(); @Nullable final String getInstanceFolder(); int getQuestionFontSize(); int getAnswerFontSize(); TextView getGuidanceTextView(); View getHelpTextLayout(); AudioVideoImageTextLabel getAudioVideoImageTextLabel(); MediaPlayer getPlayer(); AudioHelper getAudioHelper(); ReferenceManager getReferenceManager(); static int getPlayColor(FormEntryPrompt prompt, ThemeUtils themeUtils); PermissionUtils getPermissionUtils(); void setPermissionUtils(PermissionUtils permissionUtils); void setValueChangedListener(WidgetValueChangedListener valueChangedListener); void widgetValueChanged(); }
QuestionWidget extends RelativeLayout implements Widget { public AudioVideoImageTextLabel getAudioVideoImageTextLabel() { return audioVideoImageTextLabel; } QuestionWidget(Context context, QuestionDetails questionDetails); void release(); static boolean isRTL(); TextView getHelpTextView(); FormEntryPrompt getFormEntryPrompt(); QuestionDetails getQuestionDetails(); void recycleDrawables(); void setFocus(Context context); abstract void setOnLongClickListener(OnLongClickListener l); boolean suppressFlingGesture(MotionEvent e1, MotionEvent e2, float velocityX,
                                        float velocityY); Bundle getState(); Bundle getCurrentState(); void cancelLongPress(); void showWarning(String warningBody); void stopAudio(); @Override final void waitForData(); @Override final void cancelWaitingForData(); @Override final boolean isWaitingForData(); @Nullable final String getInstanceFolder(); int getQuestionFontSize(); int getAnswerFontSize(); TextView getGuidanceTextView(); View getHelpTextLayout(); AudioVideoImageTextLabel getAudioVideoImageTextLabel(); MediaPlayer getPlayer(); AudioHelper getAudioHelper(); ReferenceManager getReferenceManager(); static int getPlayColor(FormEntryPrompt prompt, ThemeUtils themeUtils); PermissionUtils getPermissionUtils(); void setPermissionUtils(PermissionUtils permissionUtils); void setValueChangedListener(WidgetValueChangedListener valueChangedListener); void widgetValueChanged(); @Inject
    public ReferenceManager referenceManager; @Inject
    public AudioHelperFactory audioHelperFactory; @Inject
    public Analytics analytics; }