diff options
author | Artur Signell <artur@vaadin.com> | 2016-09-11 23:40:49 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-09-11 23:41:32 +0300 |
commit | 2aad3416061586f7e2649160bd832eefe03702ad (patch) | |
tree | 4c468210506b70b45ae04b0687cba37080275936 /server | |
parent | c970a78d42a2d8f1745df7a11a74f3731f8be9a5 (diff) | |
download | vaadin-framework-2aad3416061586f7e2649160bd832eefe03702ad.tar.gz vaadin-framework-2aad3416061586f7e2649160bd832eefe03702ad.zip |
Make test independent of any converters present in the factory
Change-Id: I8b6b45df9d3929e4447976b8c7ae72e6491fb1af
Diffstat (limited to 'server')
-rw-r--r-- | server/src/test/java/com/vaadin/ui/ComboBoxTest.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server/src/test/java/com/vaadin/ui/ComboBoxTest.java b/server/src/test/java/com/vaadin/ui/ComboBoxTest.java index b118cb8c09..ec7ebb48e0 100644 --- a/server/src/test/java/com/vaadin/ui/ComboBoxTest.java +++ b/server/src/test/java/com/vaadin/ui/ComboBoxTest.java @@ -25,13 +25,13 @@ public class ComboBoxTest { public void options_noFilter() { ComboBox comboBox = new ComboBox(); for (int i = 0; i < 10; i++) { - comboBox.addItem(i); + comboBox.addItem("" + i); } List<?> options = comboBox.getFilteredOptions(); Assert.assertEquals(10, options.size()); for (int i = 0; i < 10; i++) { - Assert.assertEquals(i, options.get(i)); + Assert.assertEquals("" + i, options.get(i)); } } @@ -39,7 +39,7 @@ public class ComboBoxTest { @Test public void options_inMemoryFilteringStartsWith() { for (int i = 0; i < 21; i++) { - comboBox.addItem(i); + comboBox.addItem("" + i); } setFilterAndCurrentPage(comboBox, "1", 0); @@ -53,7 +53,7 @@ public class ComboBoxTest { public void options_inMemoryFilteringContains() { comboBox.setFilteringMode(FilteringMode.CONTAINS); for (int i = 0; i < 21; i++) { - comboBox.addItem(i); + comboBox.addItem("" + i); } setFilterAndCurrentPage(comboBox, "2", 0); @@ -75,7 +75,7 @@ public class ComboBoxTest { public void getOptions_moreThanOnePage_noNullItem() { int nrOptions = comboBox.getPageLength() * 2; for (int i = 0; i < nrOptions; i++) { - comboBox.addItem(i); + comboBox.addItem("" + i); } setFilterAndCurrentPage(comboBox, "", 0); @@ -89,7 +89,7 @@ public class ComboBoxTest { public void getOptions_moreThanOnePage_nullItem() { int nrOptions = comboBox.getPageLength() * 2; for (int i = 0; i < nrOptions; i++) { - comboBox.addItem(i); + comboBox.addItem("" + i); } setFilterAndCurrentPage(comboBox, "", 0); @@ -110,7 +110,7 @@ public class ComboBoxTest { public void getOptions_lessThanOnePage_noNullItem() { int nrOptions = comboBox.getPageLength() / 2; for (int i = 0; i < nrOptions; i++) { - comboBox.addItem(i); + comboBox.addItem("" + i); } setFilterAndCurrentPage(comboBox, "", 0); @@ -124,7 +124,7 @@ public class ComboBoxTest { public void getOptions_lessThanOnePage_withNullItem() { int nrOptions = comboBox.getPageLength() / 2; for (int i = 0; i < nrOptions; i++) { - comboBox.addItem(i); + comboBox.addItem("" + i); } setFilterAndCurrentPage(comboBox, "", 0); @@ -139,7 +139,7 @@ public class ComboBoxTest { public void getOptions_exactlyOnePage_withNullItem() { int nrOptions = comboBox.getPageLength(); for (int i = 0; i < nrOptions; i++) { - comboBox.addItem(i); + comboBox.addItem("" + i); } setFilterAndCurrentPage(comboBox, "", 0); |