Search in sources :

Example 1 with Elemental2DomUtil

use of org.jboss.errai.common.client.dom.elemental2.Elemental2DomUtil in project kie-wb-common by kiegroup.

the class ExampleImportPresenterTest method setup.

@Before
public void setup() {
    libraryServiceCaller = new CallerMock<>(libraryService);
    examplesServiceCaller = new CallerMock<>(examplesService);
    tileWidget = spy(new ExampleProjectWidget(mock(ExampleProjectWidget.View.class), exampleProjectOkPresenter, exampleProjectErrorPresenter, branchSelectorPopUpPresenter));
    doReturn("space1").when(organizationalUnit).getName();
    doReturn(tileWidget).when(tileWidgets).get();
    doAnswer(invocationOnMock -> spy(new ExampleProjectWidget(mock(ExampleProjectWidget.View.class), exampleProjectOkPresenter, exampleProjectErrorPresenter, branchSelectorPopUpPresenter))).when(tileWidgets).get();
    importPresenter = spy(new ExamplesImportPresenter(view, libraryPlaces, tileWidgets, examplesServiceCaller, mock(WorkspaceProjectContext.class), notificationEvent, projectContextChangeEvent, new Elemental2DomUtil(), mock(TranslationService.class), importProjectsPreferences, libraryServiceCaller));
    doReturn(organizationalUnit).when(importPresenter).activeOrganizationalUnit();
}
Also used : TranslationService(org.jboss.errai.ui.client.local.spi.TranslationService) Elemental2DomUtil(org.jboss.errai.common.client.dom.elemental2.Elemental2DomUtil) WorkspaceProjectContext(org.guvnor.common.services.project.client.context.WorkspaceProjectContext) ExampleProjectWidget(org.kie.workbench.common.screens.library.client.widgets.example.ExampleProjectWidget) Before(org.junit.Before)

Aggregations

WorkspaceProjectContext (org.guvnor.common.services.project.client.context.WorkspaceProjectContext)1 Elemental2DomUtil (org.jboss.errai.common.client.dom.elemental2.Elemental2DomUtil)1 TranslationService (org.jboss.errai.ui.client.local.spi.TranslationService)1 Before (org.junit.Before)1 ExampleProjectWidget (org.kie.workbench.common.screens.library.client.widgets.example.ExampleProjectWidget)1