Search in sources :

Example 1 with UpdatedAssetsEvent

use of org.kie.workbench.common.screens.library.client.screens.assets.events.UpdatedAssetsEvent in project kie-wb-common by kiegroup.

the class PopulatedAssetsScreenTest method testOnAssetsUpdate.

@Test
public void testOnAssetsUpdate() throws Exception {
    final UpdatedAssetsEvent mockedEvent = mock(UpdatedAssetsEvent.class);
    final ProjectAssetsQuery mockedQuery = mock(ProjectAssetsQuery.class);
    doReturn(mockedQuery).when(populatedAssetsScreen).createProjectQuery("", "ALL", 0, 0);
    populatedAssetsScreen.init();
    populatedAssetsScreen.onAssetsUpdated(mockedEvent);
    verify(assetQueryService).getNumberOfAssets(mockedQuery);
}
Also used : UpdatedAssetsEvent(org.kie.workbench.common.screens.library.client.screens.assets.events.UpdatedAssetsEvent) ProjectAssetsQuery(org.kie.workbench.common.screens.library.api.ProjectAssetsQuery) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ProjectAssetsQuery (org.kie.workbench.common.screens.library.api.ProjectAssetsQuery)1 UpdatedAssetsEvent (org.kie.workbench.common.screens.library.client.screens.assets.events.UpdatedAssetsEvent)1