use of org.odk.collect.android.listeners.WidgetValueChangedListener in project collect by opendatakit.
the class DateTimeWidgetTest method clearAnswer_callValueChangeListener.
@Test
public void clearAnswer_callValueChangeListener() {
DateTimeWidget widget = createWidget(promptWithQuestionDefAndAnswer(questionDef, new DateTimeData(localDateTime.toDate())));
WidgetValueChangedListener valueChangedListener = mockValueChangedListener(widget);
widget.clearAnswer();
verify(valueChangedListener).widgetValueChanged(widget);
}
use of org.odk.collect.android.listeners.WidgetValueChangedListener in project collect by opendatakit.
the class GeoPointWidgetTest method setData_callsValueChangeListener.
@Test
public void setData_callsValueChangeListener() {
GeoPointWidget widget = createWidget(promptWithAnswer(null));
WidgetValueChangedListener valueChangedListener = mockValueChangedListener(widget);
widget.setData(answer.getDisplayText());
verify(valueChangedListener).widgetValueChanged(widget);
}
use of org.odk.collect.android.listeners.WidgetValueChangedListener in project collect by opendatakit.
the class GeoPointWidgetTest method clearAnswer_callsValueChangeListeners.
@Test
public void clearAnswer_callsValueChangeListeners() {
GeoPointWidget widget = createWidget(promptWithAnswer(null));
WidgetValueChangedListener valueChangedListener = mockValueChangedListener(widget);
widget.clearAnswer();
verify(valueChangedListener).widgetValueChanged(widget);
}
use of org.odk.collect.android.listeners.WidgetValueChangedListener in project collect by opendatakit.
the class TriggerWidgetTest method checkingCheckbox_callsValueChangeListeners.
@Test
public void checkingCheckbox_callsValueChangeListeners() {
TriggerWidget widget = createWidget(promptWithAnswer(null));
WidgetValueChangedListener valueChangedListener = mockValueChangedListener(widget);
CheckBox triggerButton = widget.getCheckBox();
triggerButton.setChecked(true);
verify(valueChangedListener).widgetValueChanged(widget);
}
use of org.odk.collect.android.listeners.WidgetValueChangedListener in project collect by opendatakit.
the class GeoTraceWidgetTest method setData_callsValueChangeListener.
@Test
public void setData_callsValueChangeListener() {
GeoTraceWidget widget = createWidget(promptWithAnswer(null));
WidgetValueChangedListener valueChangedListener = mockValueChangedListener(widget);
widget.setData(answer);
verify(valueChangedListener).widgetValueChanged(widget);
}
Aggregations