Search in sources :

Example 1 with NumberPickerDialog

use of org.odk.collect.android.fragments.dialogs.NumberPickerDialog in project collect by opendatakit.

the class RangeWidgetUtilsTest method clickingPickerButton_showsNumberPickerDialog.

@Test
public void clickingPickerButton_showsNumberPickerDialog() {
    WidgetTestActivity activity = CollectHelpers.createThemedActivity(WidgetTestActivity.class);
    RangeWidgetUtils.showNumberPickerDialog(activity, new String[] {}, 0, 0);
    RobolectricHelpers.runLooper();
    NumberPickerDialog numberPickerDialog = (NumberPickerDialog) activity.getSupportFragmentManager().findFragmentByTag(NumberPickerDialog.NUMBER_PICKER_DIALOG_TAG);
    assertNotNull(numberPickerDialog);
}
Also used : WidgetTestActivity(org.odk.collect.android.support.WidgetTestActivity) NumberPickerDialog(org.odk.collect.android.fragments.dialogs.NumberPickerDialog) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 NumberPickerDialog (org.odk.collect.android.fragments.dialogs.NumberPickerDialog)1 WidgetTestActivity (org.odk.collect.android.support.WidgetTestActivity)1