Search in sources :

Example 1 with ExplorerService

use of org.kie.workbench.common.screens.explorer.service.ExplorerService in project kie-wb-common by kiegroup.

the class ExplorerServiceImplTest method explorerServiceShouldBeADependentBean.

@Test
public void explorerServiceShouldBeADependentBean() {
    ExplorerService reference1 = lookupReference();
    ExplorerService reference2 = lookupReference();
    assertNotSame(reference1, reference2);
}
Also used : ExplorerService(org.kie.workbench.common.screens.explorer.service.ExplorerService) Test(org.junit.Test)

Example 2 with ExplorerService

use of org.kie.workbench.common.screens.explorer.service.ExplorerService in project kie-wb-common by kiegroup.

the class ActiveOptionsInitParamTest method testParametersInPlaceRequest.

@Test
public void testParametersInPlaceRequest() throws Exception {
    options = new ActiveContextOptions(new CallerMock<ExplorerService>(mock(ExplorerService.class)), changedEvent);
    PlaceRequest placeRequest = mock(PlaceRequest.class);
    when(placeRequest.getParameter("mode", "")).thenReturn(mode);
    options.init(placeRequest, mock(Command.class));
    assertTrue(options.getOptions().contains(option1));
    assertTrue(options.getOptions().contains(option2));
}
Also used : PlaceRequest(org.uberfire.mvp.PlaceRequest) Command(org.uberfire.mvp.Command) ExplorerService(org.kie.workbench.common.screens.explorer.service.ExplorerService) CallerMock(org.uberfire.mocks.CallerMock) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 ExplorerService (org.kie.workbench.common.screens.explorer.service.ExplorerService)2 CallerMock (org.uberfire.mocks.CallerMock)1 Command (org.uberfire.mvp.Command)1 PlaceRequest (org.uberfire.mvp.PlaceRequest)1