use of org.odk.collect.android.formentry.media.AudioHelperFactory in project collect by opendatakit.
the class SelectOneWidgetTest method overrideDependencyModule.
private void overrideDependencyModule() throws Exception {
ReferenceManager referenceManager = setupFakeReferenceManager(REFERENCES);
CollectHelpers.overrideAppDependencyModule(new AppDependencyModule() {
@Override
public ReferenceManager providesReferenceManager() {
return referenceManager;
}
@Override
public AudioHelperFactory providesAudioHelperFactory(Scheduler scheduler) {
return context -> audioHelper;
}
@Override
public Analytics providesAnalytics(Application application) {
return analytics;
}
@Override
public SoftKeyboardController provideSoftKeyboardController() {
return mock(SoftKeyboardController.class);
}
});
}
use of org.odk.collect.android.formentry.media.AudioHelperFactory in project collect by opendatakit.
the class SelectMultiWidgetTest method overrideDependencyModule.
private void overrideDependencyModule() throws Exception {
ReferenceManager referenceManager = setupFakeReferenceManager(REFERENCES);
CollectHelpers.overrideAppDependencyModule(new AppDependencyModule() {
@Override
public ReferenceManager providesReferenceManager() {
return referenceManager;
}
@Override
public AudioHelperFactory providesAudioHelperFactory(Scheduler scheduler) {
return context -> audioHelper;
}
@Override
public Analytics providesAnalytics(Application application) {
return analytics;
}
@Override
public SoftKeyboardController provideSoftKeyboardController() {
return mock(SoftKeyboardController.class);
}
});
}
use of org.odk.collect.android.formentry.media.AudioHelperFactory in project collect by opendatakit.
the class QuestionWidgetTest method overrideDependencyModule.
private void overrideDependencyModule() throws Exception {
ReferenceManager referenceManager = setupFakeReferenceManager(asList(new Pair<>("ref", "blah.mp3")));
CollectHelpers.overrideAppDependencyModule(new AppDependencyModule() {
@Override
public ReferenceManager providesReferenceManager() {
return referenceManager;
}
@Override
public AudioHelperFactory providesAudioHelperFactory(Scheduler scheduler) {
return context -> audioHelper;
}
@Override
public Analytics providesAnalytics(Application application) {
return analytics;
}
});
}
Aggregations