aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2017-02-21 09:19:41 +0200
committerAleksi Hietanen <aleksi@vaadin.com>2017-02-21 09:19:41 +0200
commitc063168fe202783e3135087c49aa90a78e6b75bf (patch)
tree4f31185597e35039e890cdd1a998822f52e531f7 /server/src/test
parenta720d998f5241fc71050b29a00cfc120ba8c7620 (diff)
downloadvaadin-framework-c063168fe202783e3135087c49aa90a78e6b75bf.tar.gz
vaadin-framework-c063168fe202783e3135087c49aa90a78e6b75bf.zip
Correctly test for mutually comparable types (#8598)
Diffstat (limited to 'server/src/test')
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridTest.java
index 397bc27b82..40c753943e 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridTest.java
@@ -9,6 +9,7 @@ import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
@@ -487,6 +488,12 @@ public class GridTest {
testValueProviderSorting(10.1, 200, 3000.1, 4000);
}
+ @Test
+ public void defaultSorting_mutuallyComparableTypes() {
+ testValueProviderSorting(new Date(10), new java.sql.Date(1000000),
+ new Date(100000000));
+ }
+
private static void testValueProviderSorting(Object... expectedOrder) {
SerializableComparator<Object> comparator = new Grid<>()
.addColumn(ValueProvider.identity())