use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class RecordingRequesterProviderTest method whenQualityIsVoiceOnly_andSettingExternalPreferred_createsInternalRecordingRequester.
@Test
public void whenQualityIsVoiceOnly_andSettingExternalPreferred_createsInternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withBindAttribute("odk", "quality", "voice-only").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 whenQualityIsExternal_andSettingExternalNotPreferred_createsExternalRecordingRequester.
@Test
public void whenQualityIsExternal_andSettingExternalNotPreferred_createsExternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withBindAttribute("odk", "quality", "external").build();
RecordingRequester recordingRequester = provider.create(prompt, false);
assertThat(recordingRequester, instanceOf(ExternalAppRecordingRequester.class));
}
use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class RecordingRequesterProviderTest method whenQualityIsNormal_andSettingExternalNotPreferred_createsInternalRecordingRequester.
@Test
public void whenQualityIsNormal_andSettingExternalNotPreferred_createsInternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withBindAttribute("odk", "quality", "normal").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 whenQualityIsLow_andSettingExternalPreferred_createsInternalRecordingRequester.
@Test
public void whenQualityIsLow_andSettingExternalPreferred_createsInternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withBindAttribute("odk", "quality", "low").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 whenNoQualitySpecified_andSettingExternalNotPreferred_createsInternalRecordingRequester.
@Test
public void whenNoQualitySpecified_andSettingExternalNotPreferred_createsInternalRecordingRequester() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().build();
RecordingRequester recordingRequester = provider.create(prompt, false);
assertThat(recordingRequester, instanceOf(InternalRecordingRequester.class));
}
Aggregations