Package com.vaadin.tests
Class DataProviderListenersTest
- java.lang.Object
-
- com.vaadin.tests.DataProviderListenersTest
-
public final class DataProviderListenersTest extends Object
Util class for testing how components with data provider handles the data provider listener on attaching/detaching and on setting a new data provider.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <C extends com.vaadin.flow.data.provider.HasListDataView<Object,?>>
voidcheckOldListenersRemovedOnComponentAttachAndDetach(C component, int expectedListenersCountAfterDataProviderSetup, int expectedListenersCountAfterComponentAttach, int[] expectedRemovedListenerIndexes, com.vaadin.flow.component.UI mockUI)Checks the old data provider listeners of the component are removed after component attach/detach and a new ones are added.
-
-
-
Method Detail
-
checkOldListenersRemovedOnComponentAttachAndDetach
public static <C extends com.vaadin.flow.data.provider.HasListDataView<Object,?>> void checkOldListenersRemovedOnComponentAttachAndDetach(C component, int expectedListenersCountAfterDataProviderSetup, int expectedListenersCountAfterComponentAttach, int[] expectedRemovedListenerIndexes, com.vaadin.flow.component.UI mockUI)
Checks the old data provider listeners of the component are removed after component attach/detach and a new ones are added.- Type Parameters:
C- component type- Parameters:
component- to be attached/detachedexpectedListenersCountAfterDataProviderSetup- expected listeners count after setting a data provider to componentexpectedListenersCountAfterComponentAttach- expected listeners count after attaching the componentexpectedRemovedListenerIndexes- indexes of listeners which are supposed to be removed after attach and detach of component, index starts from 0.mockUI- UI the component is attached to
-
-