--- /dev/null
+package com.vaadin.tests.server.component.datefield;\r
+\r
+import java.util.ArrayList;\r
+\r
+import junit.framework.TestCase;\r
+\r
+import com.vaadin.tests.util.TestUtil;\r
+import com.vaadin.ui.DateField.Resolution;\r
+\r
+public class ResolutionTest extends TestCase {\r
+\r
+ public void testResolutionHigherOrEqualToYear() {\r
+ Iterable<Resolution> higherOrEqual = Resolution\r
+ .getResolutionsHigherOrEqualTo(Resolution.YEAR);\r
+ ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
+ expected.add(Resolution.YEAR);\r
+ TestUtil.assertIterableEquals(expected, higherOrEqual);\r
+ }\r
+\r
+ public void testResolutionHigherOrEqualToDay() {\r
+ Iterable<Resolution> higherOrEqual = Resolution\r
+ .getResolutionsHigherOrEqualTo(Resolution.DAY);\r
+ ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
+ expected.add(Resolution.DAY);\r
+ expected.add(Resolution.MONTH);\r
+ expected.add(Resolution.YEAR);\r
+ TestUtil.assertIterableEquals(expected, higherOrEqual);\r
+\r
+ }\r
+\r
+ public void testResolutionLowerThanDay() {\r
+ Iterable<Resolution> higherOrEqual = Resolution\r
+ .getResolutionsLowerThan(Resolution.DAY);\r
+ ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
+ expected.add(Resolution.HOUR);\r
+ expected.add(Resolution.MINUTE);\r
+ expected.add(Resolution.SECOND);\r
+ TestUtil.assertIterableEquals(expected, higherOrEqual);\r
+\r
+ }\r
+\r
+ public void testResolutionLowerThanSecond() {\r
+ Iterable<Resolution> higherOrEqual = Resolution\r
+ .getResolutionsLowerThan(Resolution.SECOND);\r
+ ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
+ TestUtil.assertIterableEquals(expected, higherOrEqual);\r
+ }\r
+\r
+ public void testResolutionLowerThanYear() {\r
+ Iterable<Resolution> higherOrEqual = Resolution\r
+ .getResolutionsLowerThan(Resolution.YEAR);\r
+ ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
+ expected.add(Resolution.MONTH);\r
+ expected.add(Resolution.DAY);\r
+ expected.add(Resolution.HOUR);\r
+ expected.add(Resolution.MINUTE);\r
+ expected.add(Resolution.SECOND);\r
+ TestUtil.assertIterableEquals(expected, higherOrEqual);\r
+\r
+ }\r
+}\r
+++ /dev/null
-package com.vaadin.tests.components.datefield;\r
-\r
-import java.util.ArrayList;\r
-\r
-import junit.framework.TestCase;\r
-\r
-import com.vaadin.tests.util.TestUtil;\r
-import com.vaadin.ui.DateField.Resolution;\r
-\r
-public class ResolutionTest extends TestCase {\r
-\r
- public void testResolutionHigherOrEqualToYear() {\r
- Iterable<Resolution> higherOrEqual = Resolution\r
- .getResolutionsHigherOrEqualTo(Resolution.YEAR);\r
- ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
- expected.add(Resolution.YEAR);\r
- TestUtil.assertIterableEquals(expected, higherOrEqual);\r
- }\r
-\r
- public void testResolutionHigherOrEqualToDay() {\r
- Iterable<Resolution> higherOrEqual = Resolution\r
- .getResolutionsHigherOrEqualTo(Resolution.DAY);\r
- ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
- expected.add(Resolution.DAY);\r
- expected.add(Resolution.MONTH);\r
- expected.add(Resolution.YEAR);\r
- TestUtil.assertIterableEquals(expected, higherOrEqual);\r
-\r
- }\r
-\r
- public void testResolutionLowerThanDay() {\r
- Iterable<Resolution> higherOrEqual = Resolution\r
- .getResolutionsLowerThan(Resolution.DAY);\r
- ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
- expected.add(Resolution.HOUR);\r
- expected.add(Resolution.MINUTE);\r
- expected.add(Resolution.SECOND);\r
- TestUtil.assertIterableEquals(expected, higherOrEqual);\r
-\r
- }\r
-\r
- public void testResolutionLowerThanSecond() {\r
- Iterable<Resolution> higherOrEqual = Resolution\r
- .getResolutionsLowerThan(Resolution.SECOND);\r
- ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
- TestUtil.assertIterableEquals(expected, higherOrEqual);\r
- }\r
-\r
- public void testResolutionLowerThanYear() {\r
- Iterable<Resolution> higherOrEqual = Resolution\r
- .getResolutionsLowerThan(Resolution.YEAR);\r
- ArrayList<Resolution> expected = new ArrayList<Resolution>();\r
- expected.add(Resolution.MONTH);\r
- expected.add(Resolution.DAY);\r
- expected.add(Resolution.HOUR);\r
- expected.add(Resolution.MINUTE);\r
- expected.add(Resolution.SECOND);\r
- TestUtil.assertIterableEquals(expected, higherOrEqual);\r
-\r
- }\r
-}\r