Search in sources :

Example 6 with IntentLauncher

use of org.odk.collect.androidshared.system.IntentLauncher in project collect by opendatakit.

the class ExArbitraryFileWidgetTest method setup.

@Before
public void setup() {
    mediaUtils = mock(MediaUtils.class);
    CollectHelpers.overrideAppDependencyModule(new AppDependencyModule() {

        @Override
        public MediaUtils providesMediaUtils(IntentLauncher intentLauncher) {
            return mediaUtils;
        }
    });
    when(mediaUtils.isAudioFile(any())).thenReturn(true);
}
Also used : IntentLauncher(org.odk.collect.androidshared.system.IntentLauncher) MediaUtils(org.odk.collect.android.utilities.MediaUtils) AppDependencyModule(org.odk.collect.android.injection.config.AppDependencyModule) Before(org.junit.Before)

Aggregations

AppDependencyModule (org.odk.collect.android.injection.config.AppDependencyModule)6 MediaUtils (org.odk.collect.android.utilities.MediaUtils)6 IntentLauncher (org.odk.collect.androidshared.system.IntentLauncher)6 Before (org.junit.Before)5 Intent (android.content.Intent)1 Test (org.junit.Test)1 FileWidgetTest (org.odk.collect.android.widgets.base.FileWidgetTest)1