From dd5597d9014032cc366d4b70405e007b1876c350 Mon Sep 17 00:00:00 2001 From: Ahmed Ashour Date: Fri, 13 Oct 2017 08:53:17 +0200 Subject: Convert AbstractDateField not to be a LegacyComponent (#10148) --- .../datefield/DateFieldListenersTest.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'server/src/test/java') diff --git a/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldListenersTest.java index cab1addf58..4edc2a30df 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldListenersTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldListenersTest.java @@ -1,8 +1,6 @@ package com.vaadin.tests.server.component.datefield; -import java.io.Serializable; -import java.time.temporal.Temporal; -import java.time.temporal.TemporalAdjuster; +import java.time.LocalDateTime; import java.util.Date; import java.util.Map; @@ -13,43 +11,45 @@ import com.vaadin.event.FieldEvents.BlurEvent; import com.vaadin.event.FieldEvents.BlurListener; import com.vaadin.event.FieldEvents.FocusEvent; import com.vaadin.event.FieldEvents.FocusListener; +import com.vaadin.shared.ui.datefield.DateTimeResolution; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; import com.vaadin.ui.AbstractDateField; public class DateFieldListenersTest extends AbstractListenerMethodsTestBase { - public static class TestDateField, R extends Enum> - extends AbstractDateField { + public static class TestDateField + extends AbstractDateField { public TestDateField() { - super(null); + super(DateTimeResolution.DAY); } @Override - protected int getDatePart(T date, R resolution) { + protected int getDatePart(LocalDateTime date, + DateTimeResolution resolution) { return 0; } @Override - protected T buildDate(Map resolutionValues) { + protected LocalDateTime buildDate( + Map resolutionValues) { return null; } @Override - protected RangeValidator getRangeValidator() { + protected RangeValidator getRangeValidator() { return null; } @Override - protected T convertFromDate(Date date) { + protected LocalDateTime convertFromDate(Date date) { return null; } @Override - protected Date convertToDate(T date) { + protected Date convertToDate(LocalDateTime date) { return null; } - } @Test -- cgit v1.2.3