use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsSetupTest method prepareRuntimeActionsSetupTest.
private void prepareRuntimeActionsSetupTest(final String status) {
runtime = mockRuntime();
runtime.setStatus(status);
item = new RuntimeListItem(RUNTIME_NAME, runtime);
presenter.setup(item);
}
use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method prepareRuntime.
private void prepareRuntime() {
runtime = mockRuntime();
item = new RuntimeListItem(RUNTIME_NAME, runtime);
presenter.setup(item);
}
use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testOnCurrentPipelineExecutionStopped.
@Test
public void testOnCurrentPipelineExecutionStopped() {
preparePipelineExecutionTraceSetup();
PipelineExecutionTraceKey currentKey = trace.getKey();
RuntimeListItem item = new RuntimeListItem(RUNTIME_NAME, trace);
presenter.setup(item);
presenter.onPipelineExecutionChange(new PipelineExecutionChangeEvent(PipelineExecutionChange.STOPPED, currentKey));
verify(presenter, times(1)).refresh(currentKey);
}
use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testShowPipelineExecutionError.
@Test
public void testShowPipelineExecutionError() {
trace = mockPipelineExecutionTrace(EXECUTION_ID, mockPipeline(PIPELINE_NAME, STAGE_NUMBER), mock(PipelineStatus.class), mock(PipelineStatus.class));
trace.setPipelineStatus(PipelineStatus.ERROR);
trace.setPipelineError(new PipelineError(PIPELINE_ERROR, PIPELINE_ERROR_DETAIL));
item = new RuntimeListItem(RUNTIME_NAME, trace);
presenter.setup(item);
presenter.showPipelineError();
verify(popupHelper, times(1)).showErrorPopup(PIPELINE_ERROR, PIPELINE_ERROR_DETAIL);
}
use of org.guvnor.ala.ui.model.RuntimeListItem in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testOnOtherPipelineExecutionStopped.
@Test
public void testOnOtherPipelineExecutionStopped() {
preparePipelineExecutionTraceSetup();
PipelineExecutionTraceKey otherKey = mock(PipelineExecutionTraceKey.class);
RuntimeListItem item = new RuntimeListItem(RUNTIME_NAME, trace);
presenter.setup(item);
presenter.onPipelineExecutionChange(new PipelineExecutionChangeEvent(PipelineExecutionChange.STOPPED, otherKey));
verify(presenter, never()).refresh(any(PipelineExecutionTraceKey.class));
}
Aggregations