use of org.uberfire.mvp.Command in project kie-wb-common by kiegroup.
the class InvocationGridTest method testOnItemSelected.
@Test
public void testOnItemSelected() {
setupGrid(0);
final Command command = mock(Command.class);
final HasListSelectorControl.ListSelectorTextItem listSelectorItem = mock(HasListSelectorControl.ListSelectorTextItem.class);
when(listSelectorItem.getCommand()).thenReturn(command);
grid.onItemSelected(listSelectorItem);
verify(command).execute();
}
use of org.uberfire.mvp.Command in project kie-wb-common by kiegroup.
the class TileWidgetTest method initTest.
@Test
public void initTest() {
final Command selectCommand = mock(Command.class);
presenter.init("label", "description", "circleLabel", "circleDescription", selectCommand);
verify(view).setup("label", "description", "circleLabel", "circleDescription", selectCommand);
}
use of org.uberfire.mvp.Command in project kie-wb-common by kiegroup.
the class LinkTitlePresenterTest method testSetup.
@Test
public void testSetup() {
final Command command = mock(Command.class);
presenter.setup("title", command);
verify(view).setText("title");
presenter.onSelect();
verify(command).execute();
}
use of org.uberfire.mvp.Command in project kie-wb-common by kiegroup.
the class DefaultAdminPageHelper method addDataSetPerspective.
private void addDataSetPerspective() {
if (hasAccessToPerspective(PerspectiveIds.DATASET_AUTHORING)) {
adminPage.addTool("root", constants.DataSets(), "fa-folder-open", "perspectives", () -> {
final Command accessDataSets = () -> placeManager.goTo(PerspectiveIds.DATASET_AUTHORING);
accessDataSets.execute();
addAdminBreadcrumbs(PerspectiveIds.DATASET_AUTHORING, constants.DataSets(), accessDataSets);
});
}
}
use of org.uberfire.mvp.Command in project kie-wb-common by kiegroup.
the class DefaultAdminPageHelper method addArtifactsPerspective.
private void addArtifactsPerspective() {
if (hasAccessToPerspective(PerspectiveIds.GUVNOR_M2REPO)) {
adminPage.addTool("root", constants.Artifacts(), "fa-download", "perspectives", () -> {
final Command accessArtifacts = () -> placeManager.goTo(GUVNOR_M2REPO);
accessArtifacts.execute();
addAdminBreadcrumbs(GUVNOR_M2REPO, constants.Artifacts(), accessArtifacts);
});
}
}
Aggregations