Search in sources :

Example 11 with ProjectAssetsQuery

use of org.kie.workbench.common.screens.library.api.ProjectAssetsQuery 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

ProjectAssetsQuery (org.kie.workbench.common.screens.library.api.ProjectAssetsQuery)11 Test (org.junit.Test)7 WorkspaceProject (org.guvnor.common.services.project.model.WorkspaceProject)6 RefactoringPageRequest (org.kie.workbench.common.services.refactoring.model.query.RefactoringPageRequest)5 Path (org.uberfire.backend.vfs.Path)5 Branch (org.guvnor.structure.repositories.Branch)4 RefactoringPageRow (org.kie.workbench.common.services.refactoring.model.query.RefactoringPageRow)4 PageResponse (org.uberfire.paging.PageResponse)4 AssetQueryResult (org.kie.workbench.common.screens.library.api.AssetQueryResult)3 ArrayList (java.util.ArrayList)2 AssetInfo (org.kie.workbench.common.screens.library.api.AssetInfo)2 NoSuchFileException (org.uberfire.java.nio.file.NoSuchFileException)2 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Date (java.util.Date)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Map (java.util.Map)1 Optional (java.util.Optional)1 Set (java.util.Set)1