Search in sources :

Example 1 with TestDatePicker

use of com.vaadin.flow.data.binder.testcomponents.TestDatePicker in project flow by vaadin.

the class ValueContextTest method testHasValue2.

@Test
public void testHasValue2() {
    setLocale(Locale.getDefault());
    ValueContext fromComponent = new ValueContext(new TestDatePicker(), textField);
    Assert.assertEquals(textField, fromComponent.getHasValue().get());
}
Also used : TestDatePicker(com.vaadin.flow.data.binder.testcomponents.TestDatePicker) Test(org.junit.Test)

Example 2 with TestDatePicker

use of com.vaadin.flow.data.binder.testcomponents.TestDatePicker in project flow by vaadin.

the class ValueContextTest method testHasValue3.

@Test
public void testHasValue3() {
    setLocale(Locale.getDefault());
    ValueContext fromComponent = new ValueContext(new TestDatePicker(), textField, Locale.CANADA);
    Assert.assertEquals(textField, fromComponent.getHasValue().get());
    Assert.assertEquals(Locale.CANADA, fromComponent.getLocale().get());
}
Also used : TestDatePicker(com.vaadin.flow.data.binder.testcomponents.TestDatePicker) Test(org.junit.Test)

Aggregations

TestDatePicker (com.vaadin.flow.data.binder.testcomponents.TestDatePicker)2 Test (org.junit.Test)2