use of org.kie.workbench.common.screens.explorer.model.FolderItem in project kie-wb-common by kiegroup.
the class ClassifierTest method unsuccessfullyFindResourceTypeByFolderItemTest.
@Test(expected = IllegalArgumentException.class)
public void unsuccessfullyFindResourceTypeByFolderItemTest() {
final FolderItem folderItem = mock(FolderItem.class);
final Path path = mock(Path.class);
doReturn(path).when(folderItem).getItem();
doReturn(false).when(clientResourceType).accept(path);
classifier.findResourceType(folderItem);
}
use of org.kie.workbench.common.screens.explorer.model.FolderItem in project kie-wb-common by kiegroup.
the class BaseViewPresenterTest method testDeleteNotification.
@Test
public void testDeleteNotification() {
deletePopUpPresenterShowMock();
final FolderItem item = mock(FolderItem.class);
presenter.deleteItem(item);
verify(notification, times(1)).fire(any(NotificationEvent.class));
}
use of org.kie.workbench.common.screens.explorer.model.FolderItem in project kie-wb-common by kiegroup.
the class BaseViewPresenterTest method testRenameNotification.
@Test
public void testRenameNotification() {
renamePopUpPresenterShowMock();
when(renamePopUpPresenterMock.getView()).thenReturn(renamePopUpView);
final FolderItem item = mock(FolderItem.class);
presenter.renameItem(item);
verify(notification, times(1)).fire(any(NotificationEvent.class));
}
use of org.kie.workbench.common.screens.explorer.model.FolderItem in project kie-wb-common by kiegroup.
the class BaseViewPresenterTest method testCopyNotification.
@Test
public void testCopyNotification() {
copyPopUpPresenterShowMock();
when(copyPopUpPresenterMock.getView()).thenReturn(copyPopUpView);
final FolderItem item = mock(FolderItem.class);
presenter.copyItem(item);
verify(notification, times(1)).fire(any(NotificationEvent.class));
}
use of org.kie.workbench.common.screens.explorer.model.FolderItem in project kie-wb-common by kiegroup.
the class BaseBreadcrumbNavigatorTest method testLoadContentOnlyFile.
@Test
public void testLoadContentOnlyFile() {
final BreadcrumbNavigator navigator = spy(new BreadcrumbNavigator(activeOptions, hiddenTypeDef, user));
final FolderItem item = new FolderItem(path, "item1", FolderItemType.FILE);
final List<FolderItem> content = new ArrayList<FolderItem>() {
{
add(new FolderItem(mock(Path.class), "File1", FolderItemType.FILE));
}
};
final List<FolderItem> segments = new ArrayList<FolderItem>();
final FolderListing listing = new FolderListing(item, content, segments);
navigator.loadContent(listing);
verify(navigator).setupBreadcrumb(listing);
verify(navigator).setupUpFolder(listing);
verify(navigator).setupContent(listing);
verifyNavigatorPanelVisibility(navigator);
}
Aggregations