diff options
author | Artur Signell <artur@vaadin.com> | 2013-04-24 13:17:35 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-04-24 10:49:12 +0000 |
commit | 31cc212c35b4817d1f067093f9305877fd14cf37 (patch) | |
tree | cfc51ff9ea530f0744ef324e4671e62cc4b2eda8 /server/tests/src/com | |
parent | 4a6ed040c7c09ae61f1e3f751c0f1372610bfbc9 (diff) | |
download | vaadin-framework-31cc212c35b4817d1f067093f9305877fd14cf37.tar.gz vaadin-framework-31cc212c35b4817d1f067093f9305877fd14cf37.zip |
Replaced Filterable.hasContainerFilters with getContainerFilters (#11234)
Change-Id: Ie0b05e55c1d8fc8d10d073c508b112da740c3333
Diffstat (limited to 'server/tests/src/com')
-rw-r--r-- | server/tests/src/com/vaadin/data/util/AbstractContainerTest.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java b/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java index 64db805623..81c90ba07b 100644 --- a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java +++ b/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java @@ -314,10 +314,12 @@ public abstract class AbstractContainerTest extends TestCase { initializeContainer(container); // Filter by "contains ab" - container.addContainerFilter(new SimpleStringFilter( - FULLY_QUALIFIED_NAME, "ab", false, false)); + SimpleStringFilter filter1 = new SimpleStringFilter( + FULLY_QUALIFIED_NAME, "ab", false, false); + container.addContainerFilter(filter1); - assertTrue(container.hasContainerFilters()); + assertTrue(container.getContainerFilters().size() == 1); + assertEquals(filter1, container.getContainerFilters().iterator().next()); validateContainer(container, "com.vaadin.data.BufferedValidatable", "com.vaadin.ui.TabSheet", @@ -327,12 +329,14 @@ public abstract class AbstractContainerTest extends TestCase { // Filter by "contains da" (reversed as ad here) container.removeAllContainerFilters(); - assertFalse(container.hasContainerFilters()); + assertTrue(container.getContainerFilters().isEmpty()); - container.addContainerFilter(new SimpleStringFilter( - REVERSE_FULLY_QUALIFIED_NAME, "ad", false, false)); + SimpleStringFilter filter2 = new SimpleStringFilter( + REVERSE_FULLY_QUALIFIED_NAME, "ad", false, false); + container.addContainerFilter(filter2); - assertTrue(container.hasContainerFilters()); + assertTrue(container.getContainerFilters().size() == 1); + assertEquals(filter2, container.getContainerFilters().iterator().next()); validateContainer(container, "com.vaadin.data.Buffered", "com.vaadin.server.ComponentSizeValidator", |