use of org.kie.workbench.common.dmn.client.editors.types.listview.draganddrop.DNDListComponent in project kie-wb-common by kiegroup.
the class DataTypeSearchBarTest method testRestoreDataTypeListPositionsWhenSearchBarDoesNotHaveDataTypeListPositionsStored.
@Test
public void testRestoreDataTypeListPositionsWhenSearchBarDoesNotHaveDataTypeListPositionsStored() {
final DNDListComponent dndListComponent = mock(DNDListComponent.class);
final Map<String, Integer> store = spy(new HashMap<>());
final Map<String, Boolean> collapsedStore = spy(new HashMap<>());
when(dataTypeList.getDNDListComponent()).thenReturn(dndListComponent);
doReturn(store).when(searchBar).getDataTypeListPositionsStore();
doReturn(collapsedStore).when(searchBar).getDataTypeListCollapsedStatusStore();
searchBar.restoreDataTypeListPositions();
verify(dndListComponent, never()).setPositionY(any(), anyDouble());
verify(dndListComponent, never()).refreshItemsPosition();
verify(store, never()).clear();
verify(collapsedStore, never()).clear();
}
Aggregations