use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class WidgetFactoryTest method testCreatingSelectOneImageMapWidget.
@Test
public void testCreatingSelectOneImageMapWidget() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withControlType(Constants.CONTROL_SELECT_ONE).withAppearance("something imaGe-Map something").build();
QuestionWidget widget = widgetFactory.createWidgetFromPrompt(prompt, null);
assertThat(widget, instanceOf(SelectOneImageMapWidget.class));
}
use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class WidgetFactoryTest method testCreatingSelectMultipleImageMapWidget.
@Test
public void testCreatingSelectMultipleImageMapWidget() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withControlType(Constants.CONTROL_SELECT_MULTI).withAppearance("something imaGe-Map something").build();
QuestionWidget widget = widgetFactory.createWidgetFromPrompt(prompt, null);
assertThat(widget, instanceOf(SelectMultiImageMapWidget.class));
}
use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class WidgetFactoryTest method testCreatingSelectOneMinimalWidget.
@Test
public void testCreatingSelectOneMinimalWidget() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withControlType(Constants.CONTROL_SELECT_ONE).withAppearance("something miNimal something").build();
QuestionWidget widget = widgetFactory.createWidgetFromPrompt(prompt, null);
assertThat(widget, instanceOf(SelectOneMinimalWidget.class));
}
use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class WidgetFactoryTest method testCreatingSelectOneListWidget.
@Test
public void testCreatingSelectOneListWidget() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withControlType(Constants.CONTROL_SELECT_ONE).withAppearance("something LisT something").build();
QuestionWidget widget = widgetFactory.createWidgetFromPrompt(prompt, null);
assertThat(widget, instanceOf(ListWidget.class));
assertThat(((ListWidget) widget).shouldDisplayLabel(), is(true));
}
use of org.odk.collect.android.support.MockFormEntryPromptBuilder in project collect by opendatakit.
the class WidgetFactoryTest method testCreatingSelectMultipleOneLabelWidget.
@Test
public void testCreatingSelectMultipleOneLabelWidget() {
FormEntryPrompt prompt = new MockFormEntryPromptBuilder().withControlType(Constants.CONTROL_SELECT_MULTI).withAppearance("something lAbeL something").build();
QuestionWidget widget = widgetFactory.createWidgetFromPrompt(prompt, null);
assertThat(widget, instanceOf(LabelWidget.class));
}
Aggregations