use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method setMax_getMax_null.
@Test
public void setMax_getMax_null() {
TimePicker timePicker = new TimePicker();
assertEquals(null, timePicker.getMax());
timePicker.setMax(null);
assertEquals(null, timePicker.getMax());
assertEquals(null, timePicker.getMaxTime());
}
use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method timePickerWithPlaceholder.
@Test
public void timePickerWithPlaceholder() {
String placeholder = new String("This is a Time Picker");
TimePicker picker = new TimePicker();
picker.setPlaceholder(placeholder);
assertEquals(placeholder, picker.getElement().getProperty("placeholder"));
}
use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method timePicker_nullValue.
@Test
public void timePicker_nullValue() {
TimePicker timePicker = new TimePicker();
timePicker.setValue(null);
assertEquals(null, timePicker.getValue());
}
use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method setMinTime_getMin.
@Test
public void setMinTime_getMin() {
TimePicker timePicker = new TimePicker();
final String min = "12:00";
LocalTime minTime = LocalTime.parse(min);
timePicker.setMinTime(minTime);
assertEquals(minTime, timePicker.getMin());
assertEquals(minTime, timePicker.getMinTime());
}
use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method testSetStep_hoursNotDivideEvenly_throwsException.
@Test(expected = IllegalArgumentException.class)
public void testSetStep_hoursNotDivideEvenly_throwsException() {
TimePicker timePicker = new TimePicker();
timePicker.setStep(Duration.ofHours(5));
}
Aggregations