use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class RecordingRequesterProviderTest method whenQualityIsExternal_andSettingExternalPreferred_createsExternalRecordingRequester.
@Test
public void whenQualityIsExternal_andSettingExternalPreferred_createsExternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withBindAttribute("odk", "quality", "external").build();
RecordingRequester recordingRequester = provider.create(prompt, true);
assertThat(recordingRequester, instanceOf(ExternalAppRecordingRequester.class));
}
use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class RecordingRequesterProviderTest method whenQualityIsLow_andSettingExternalNotPreferred_createsInternalRecordingRequester.
@Test
public void whenQualityIsLow_andSettingExternalNotPreferred_createsInternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withBindAttribute("odk", "quality", "low").build();
RecordingRequester recordingRequester = provider.create(prompt, false);
assertThat(recordingRequester, instanceOf(InternalRecordingRequester.class));
}
use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class RecordingRequesterProviderTest method whenQualityIsNormal_andSettingExternalPreferred_createsInternalRecordingRequester.
@Test
public void whenQualityIsNormal_andSettingExternalPreferred_createsInternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withBindAttribute("odk", "quality", "normal").build();
RecordingRequester recordingRequester = provider.create(prompt, true);
assertThat(recordingRequester, instanceOf(InternalRecordingRequester.class));
}
use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class RecordingRequesterProviderTest method whenQualityIsVoiceOnly_andSettingExternalNotPreferred_createsInternalRecordingRequester.
@Test
public void whenQualityIsVoiceOnly_andSettingExternalNotPreferred_createsInternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withBindAttribute("odk", "quality", "voice-only").build();
RecordingRequester recordingRequester = provider.create(prompt, false);
assertThat(recordingRequester, instanceOf(InternalRecordingRequester.class));
}
Aggregations