From b247017a184dd8603ec06d1c9798f123b447a585 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Thu, 21 Mar 2013 16:43:31 +0200 Subject: Added Container.hasContainerFilters() API #11234 Change-Id: I223dbc7a8419a5c4b58321b708e8bd7c8bb8134b --- server/tests/src/com/vaadin/data/util/AbstractContainerTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'server/tests') diff --git a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java b/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java index f04acf8c46..3d9909c42c 100644 --- a/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java +++ b/server/tests/src/com/vaadin/data/util/AbstractContainerTest.java @@ -317,22 +317,29 @@ public abstract class AbstractContainerTest extends TestCase { container.addContainerFilter(new SimpleStringFilter( FULLY_QUALIFIED_NAME, "ab", false, false)); + assertTrue(container.hasContainerFilters()); + validateContainer(container, "com.vaadin.data.BufferedValidatable", "com.vaadin.ui.TabSheet", "com.vaadin.terminal.gwt.client.Focusable", "com.vaadin.data.Buffered", isFilteredOutItemNull(), 20); + // Filter by "contains da" (reversed as ad here) container.removeAllContainerFilters(); + + assertFalse(container.hasContainerFilters()); + container.addContainerFilter(new SimpleStringFilter( REVERSE_FULLY_QUALIFIED_NAME, "ad", false, false)); + assertTrue(container.hasContainerFilters()); + validateContainer(container, "com.vaadin.data.Buffered", "com.vaadin.server.ComponentSizeValidator", "com.vaadin.data.util.IndexedContainer", "com.vaadin.terminal.gwt.client.ui.VUriFragmentUtility", isFilteredOutItemNull(), 37); - } /** -- cgit v1.2.3