diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-10-12 10:46:06 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-10-12 11:46:06 +0300 |
commit | c147b5d85bca3ddf30d9adbcd268066165889f37 (patch) | |
tree | 18d73bda278618004ec4a28ee62af7eb7edbeb98 /compatibility-server/src/test | |
parent | 13d406a7086cc1546eac3fa86f6263bfb436de85 (diff) | |
download | vaadin-framework-c147b5d85bca3ddf30d9adbcd268066165889f37.tar.gz vaadin-framework-c147b5d85bca3ddf30d9adbcd268066165889f37.zip |
Use Collection.isEmpty() (#10172)
Diffstat (limited to 'compatibility-server/src/test')
2 files changed, 5 insertions, 5 deletions
diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/AbstractHierarchicalContainerTestBase.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/AbstractHierarchicalContainerTestBase.java index 816dc251b5..2b5f912f50 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/AbstractHierarchicalContainerTestBase.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/AbstractHierarchicalContainerTestBase.java @@ -73,7 +73,7 @@ public abstract class AbstractHierarchicalContainerTestBase Collection<?> children = container.getChildren(rootId); assertNotNull(rootId + " should have children", children); assertTrue(rootId + " should have children", - (children.size() > 0)); + !children.isEmpty()); // getParent for (Object childId : children) { assertEquals(container.getParent(childId), rootId); @@ -136,7 +136,7 @@ public abstract class AbstractHierarchicalContainerTestBase if (!container.areChildrenAllowed(itemId)) { // If no children is allowed the item should have no children assertFalse(container.hasChildren(itemId)); - assertTrue(children == null || children.size() == 0); + assertTrue(children == null || children.isEmpty()); return; } diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java index 09ace47f3d..836d4a9d89 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java @@ -44,8 +44,8 @@ public class TablePropertyValueConverterTest { @Test public void testRemovePropertyId() { Collection<Object> converters = table.getCurrentConverters(); - assertTrue("Set of converters was empty at the start.", - converters.size() > 0); + assertFalse("Set of converters was empty at the start.", + converters.isEmpty()); Object firstId = converters.iterator().next(); @@ -215,7 +215,7 @@ public class TablePropertyValueConverterTest { } }); Set<Object> converters = customTable.getCurrentConverters(); - assertTrue("Converter was not set.", converters.size() > 0); + assertFalse("Converter was not set.", converters.isEmpty()); } @Test |