diff options
author | Denis Anisimov <denis@vaadin.com> | 2016-10-03 09:44:17 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-10-03 09:07:17 +0000 |
commit | 7c18c3d086142c46772e7555f07c053d1b293171 (patch) | |
tree | 518b9695c459206b6acd4aefda5b9a87bb43e806 /uitest | |
parent | 43bb825f0e7fbaa3a1382f85c9b2f6f6c4fe3ac4 (diff) | |
download | vaadin-framework-7c18c3d086142c46772e7555f07c053d1b293171.tar.gz vaadin-framework-7c18c3d086142c46772e7555f07c053d1b293171.zip |
Do not derive DataSource from Function and replace apply method #307.
Change-Id: Ic0587e75c9a50c802a64673b1db0b8828b37889c
Diffstat (limited to 'uitest')
3 files changed, 11 insertions, 11 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java index cd2e8ad1f4..d78025bf4c 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java +++ b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java @@ -50,7 +50,7 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog { })); addComponent(new Button("Add first", event -> { - List<String> list = dataSource.apply(null) + List<String> list = dataSource.fetch(null) .collect(Collectors.toList()); list.add(0, "first"); dataSource = new ListDataSource<>(list); @@ -59,7 +59,7 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog { })); addComponent(new Button("Add middle", event -> { - List<String> list = dataSource.apply(null) + List<String> list = dataSource.fetch(null) .collect(Collectors.toList()); list.add(list.size() / 2, "middle"); dataSource = new ListDataSource<>(list); @@ -68,7 +68,7 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog { })); addComponent(new Button("Add last", event -> { - List<String> list = dataSource.apply(null) + List<String> list = dataSource.fetch(null) .collect(Collectors.toList()); list.add("last"); dataSource = new ListDataSource<>(list); @@ -77,7 +77,7 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog { })); addComponent(new Button("Swap", event -> { - List<String> list = dataSource.apply(null) + List<String> list = dataSource.fetch(null) .collect(Collectors.toList()); Collections.swap(list, 0, list.size() - 1); dataSource = new ListDataSource<>(list); @@ -87,7 +87,7 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog { })); addComponent(new Button("Remove first", event -> { - List<String> list = dataSource.apply(null) + List<String> list = dataSource.fetch(null) .collect(Collectors.toList()); list.remove(0); @@ -98,7 +98,7 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog { })); addComponent(new Button("Remove middle", event -> { - List<String> list = dataSource.apply(null) + List<String> list = dataSource.fetch(null) .collect(Collectors.toList()); list.remove(list.size() / 2); dataSource = new ListDataSource<>(list); @@ -107,7 +107,7 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog { })); addComponent(new Button("Remove last", event -> { - List<String> list = dataSource.apply(null) + List<String> list = dataSource.fetch(null) .collect(Collectors.toList()); list.remove(list.size() - 1); @@ -121,7 +121,7 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog { private void logContainer() { StringBuilder b = new StringBuilder(); - List<String> list = dataSource.apply(null).collect(Collectors.toList()); + List<String> list = dataSource.fetch(null).collect(Collectors.toList()); for (int i = 0; i < list.size(); i++) { Object id = list.get(i); if (i != 0) { diff --git a/uitest/src/main/java/com/vaadin/tests/data/DummyData.java b/uitest/src/main/java/com/vaadin/tests/data/DummyData.java index 8b4083d834..917eb39bbd 100644 --- a/uitest/src/main/java/com/vaadin/tests/data/DummyData.java +++ b/uitest/src/main/java/com/vaadin/tests/data/DummyData.java @@ -34,9 +34,9 @@ public class DummyData extends AbstractTestUIWithLog { } @Override - public Stream<String> apply(Query query) { + public Stream<String> fetch(Query query) { log("Backend request #" + (count++)); - return super.apply(query); + return super.fetch(query); } } diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java b/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java index 5aee3a2f15..910265696f 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java @@ -53,7 +53,7 @@ public class MovingComponentsWhileOldParentInvisible extends TestBase { }); componentContainerSelect.setValue(componentContainerSelect - .getDataSource().apply(new Query()).iterator().next()); + .getDataSource().fetch(new Query()).iterator().next()); Button but1 = new Button("Move in and out of component container", new Button.ClickListener() { |