diff options
author | Denis Anisimov <denis@vaadin.com> | 2015-07-07 19:39:05 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-07-07 17:12:10 +0000 |
commit | 802b6cbd59186d3a0823b316f7523bb4120cb678 (patch) | |
tree | 1b714dc130dc81a19818c1fe82bfb22643f1ea28 /server/tests/src | |
parent | d2c3e30f20e7566c34f0ee775d68b809583328b4 (diff) | |
download | vaadin-framework-802b6cbd59186d3a0823b316f7523bb4120cb678.tar.gz vaadin-framework-802b6cbd59186d3a0823b316f7523bb4120cb678.zip |
Always add "last" item from the string to the collection (#18433).
Change-Id: I664fcef77f469c66cd62afb2938db69b7f27e6df
Diffstat (limited to 'server/tests/src')
-rw-r--r-- | server/tests/src/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java | 10 |
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; } |