Package com.vaadin.tests.dataprovider
Class DataProviderListenersTest
java.lang.Object
com.vaadin.tests.dataprovider.DataProviderListenersTest
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
Modifier and TypeMethodDescriptionstatic <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 Details
-
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
-