Search in sources :

Example 1 with PipelineStatusChangeEvent

use of org.guvnor.ala.ui.events.PipelineStatusChangeEvent in project kie-wb-common by kiegroup.

the class PipelineExecutionListenerTest method testAfterPipelineExecution.

@Test
public void testAfterPipelineExecution() {
    listener.afterPipelineExecution(new AfterPipelineExecutionEvent(EXECUTION_ID, pipeline));
    verify(pipelineStatusChangeEvent, times(1)).fire(new PipelineStatusChangeEvent(traceKey, PipelineStatus.FINISHED));
}
Also used : AfterPipelineExecutionEvent(org.guvnor.ala.pipeline.events.AfterPipelineExecutionEvent) PipelineStatusChangeEvent(org.guvnor.ala.ui.events.PipelineStatusChangeEvent) Test(org.junit.Test)

Example 2 with PipelineStatusChangeEvent

use of org.guvnor.ala.ui.events.PipelineStatusChangeEvent in project kie-wb-common by kiegroup.

the class PipelineExecutionListenerTest method testOnPipelineError.

@Test
public void testOnPipelineError() {
    listener.onPipelineError(new OnErrorPipelineExecutionEvent(EXECUTION_ID, pipeline, stage, throwable));
    verify(pipelineStatusChangeEvent, times(1)).fire(new PipelineStatusChangeEvent(traceKey, PipelineStatus.ERROR));
}
Also used : OnErrorPipelineExecutionEvent(org.guvnor.ala.pipeline.events.OnErrorPipelineExecutionEvent) PipelineStatusChangeEvent(org.guvnor.ala.ui.events.PipelineStatusChangeEvent) Test(org.junit.Test)

Example 3 with PipelineStatusChangeEvent

use of org.guvnor.ala.ui.events.PipelineStatusChangeEvent in project kie-wb-common by kiegroup.

the class RuntimePresenterSetupsTest method testOnPipelineStatusChange.

@Test
public void testOnPipelineStatusChange() {
    preparePipelineExecutionTraceSetup();
    RuntimeListItem item = new RuntimeListItem(RUNTIME_NAME, trace);
    // setup the presenter.
    presenter.setup(item);
    // the pipeline finishes
    presenter.onPipelineStatusChange(new PipelineStatusChangeEvent(trace.getKey(), PipelineStatus.FINISHED));
    verify(view, times(1)).setStatus(RuntimePresenterHelper.buildIconStyle(PipelineStatus.FINISHED));
}
Also used : RuntimeListItem(org.guvnor.ala.ui.model.RuntimeListItem) PipelineStatusChangeEvent(org.guvnor.ala.ui.events.PipelineStatusChangeEvent) Test(org.junit.Test)

Example 4 with PipelineStatusChangeEvent

use of org.guvnor.ala.ui.events.PipelineStatusChangeEvent in project kie-wb-common by kiegroup.

the class PipelineExecutionListenerTest method testBeforePipelineExecution.

@Test
public void testBeforePipelineExecution() {
    listener.beforePipelineExecution(new BeforePipelineExecutionEvent(EXECUTION_ID, pipeline));
    verify(pipelineStatusChangeEvent, times(1)).fire(new PipelineStatusChangeEvent(traceKey, PipelineStatus.RUNNING));
}
Also used : BeforePipelineExecutionEvent(org.guvnor.ala.pipeline.events.BeforePipelineExecutionEvent) PipelineStatusChangeEvent(org.guvnor.ala.ui.events.PipelineStatusChangeEvent) Test(org.junit.Test)

Aggregations

PipelineStatusChangeEvent (org.guvnor.ala.ui.events.PipelineStatusChangeEvent)4 Test (org.junit.Test)4 AfterPipelineExecutionEvent (org.guvnor.ala.pipeline.events.AfterPipelineExecutionEvent)1 BeforePipelineExecutionEvent (org.guvnor.ala.pipeline.events.BeforePipelineExecutionEvent)1 OnErrorPipelineExecutionEvent (org.guvnor.ala.pipeline.events.OnErrorPipelineExecutionEvent)1 RuntimeListItem (org.guvnor.ala.ui.model.RuntimeListItem)1