Search in sources :

Example 1 with PlaceStatus

use of org.uberfire.client.mvp.PlaceStatus in project drools-wb by kiegroup.

the class ScenarioSimulationEditorBusinessCentralWrapperTest method showDocks_WithLastRun.

@Test
public void showDocks_WithLastRun() {
    PlaceStatus placeStatusMock = mock(PlaceStatus.class);
    final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(TestToolsPresenter.IDENTIFIER);
    when(placeManagerMock.getStatus(eq(placeRequest))).thenReturn(placeStatusMock);
    scenarioSimulationEditorBusinessClientWrapper.lastRunResult = simulationRunResultMock;
    scenarioSimulationEditorBusinessClientWrapper.showDocks();
    verify(scenarioSimulationEditorBusinessClientWrapper, times(1)).wrappedRegisterDock(eq(ScenarioSimulationBusinessCentralDocksHandler.TEST_RUNNER_REPORTING_PANEL), eq(testRunnerReportingPanelWidgetMock));
    verify(scenarioSimulationEditorPresenterMock, times(1)).showDocks(same(placeStatusMock));
    verify(scenarioSimulationBusinessCentralDocksHandlerMock, times(1)).updateTestRunnerReportingPanelResult(eq(testResultMessageMock));
}
Also used : PlaceStatus(org.uberfire.client.mvp.PlaceStatus) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) Test(org.junit.Test) AbstractScenarioSimulationEditorTest(org.drools.workbench.screens.scenariosimulation.client.editor.AbstractScenarioSimulationEditorTest)

Example 2 with PlaceStatus

use of org.uberfire.client.mvp.PlaceStatus in project drools-wb by kiegroup.

the class ScenarioSimulationEditorBusinessCentralWrapperTest method showDocks.

@Test
public void showDocks() {
    PlaceStatus placeStatusMock = mock(PlaceStatus.class);
    final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(TestToolsPresenter.IDENTIFIER);
    when(placeManagerMock.getStatus(eq(placeRequest))).thenReturn(placeStatusMock);
    scenarioSimulationEditorBusinessClientWrapper.showDocks();
    verify(scenarioSimulationEditorBusinessClientWrapper, times(1)).wrappedRegisterDock(eq(ScenarioSimulationBusinessCentralDocksHandler.TEST_RUNNER_REPORTING_PANEL), eq(testRunnerReportingPanelWidgetMock));
    verify(scenarioSimulationEditorPresenterMock, times(1)).showDocks(same(placeStatusMock));
    verify(scenarioSimulationBusinessCentralDocksHandlerMock, never()).updateTestRunnerReportingPanelResult(any());
}
Also used : PlaceStatus(org.uberfire.client.mvp.PlaceStatus) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) Test(org.junit.Test) AbstractScenarioSimulationEditorTest(org.drools.workbench.screens.scenariosimulation.client.editor.AbstractScenarioSimulationEditorTest)

Aggregations

AbstractScenarioSimulationEditorTest (org.drools.workbench.screens.scenariosimulation.client.editor.AbstractScenarioSimulationEditorTest)2 Test (org.junit.Test)2 PlaceStatus (org.uberfire.client.mvp.PlaceStatus)2 DefaultPlaceRequest (org.uberfire.mvp.impl.DefaultPlaceRequest)2