summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-13 15:46:31 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-13 15:46:31 +0300
commitae5793ae460cab22612c134cbec4b8ae6ed4175b (patch)
treee24c1924cc4882a273707661d16d9a67c875aa31 /server/tests
parent40dcbc3cfaa438c9b879720c9012331dd85ca694 (diff)
parent96e10ed8be9ec1e694001098584361e43eb35af2 (diff)
downloadvaadin-framework-ae5793ae460cab22612c134cbec4b8ae6ed4175b.tar.gz
vaadin-framework-ae5793ae460cab22612c134cbec4b8ae6ed4175b.zip
Merge remote-tracking branch 'origin/master' into grid-unbuffered-editor
Change-Id: Id630861d5089b0deabbccffe66d971252c44f46b
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java b/server/tests/src/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java
index 977985c6cb..bcd0dc15bd 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java
@@ -141,6 +141,16 @@ public class StringToCollectionConverterTest {
Assert.assertEquals("Z,Y", presentation);
}
+ @Test
+ public void convertToModel_singleItem() {
+ StringToCollectionConverter converter = new StringToCollectionConverter();
+ Collection<?> model = converter.convertToModel("a", List.class, null);
+ Iterator<?> iterator = model.iterator();
+ Assert.assertEquals("Incorrect fist token", "a", iterator.next());
+ Assert.assertFalse("More than one item detected after conversation",
+ iterator.hasNext());
+ }
+
public enum TestEnum {
X, Y, Z;
}