Search in sources :

Example 6 with PipelineExecutionChangeEvent

use of org.guvnor.ala.ui.events.PipelineExecutionChangeEvent 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));
}
Also used : RuntimeListItem(org.guvnor.ala.ui.model.RuntimeListItem) PipelineExecutionChangeEvent(org.guvnor.ala.ui.events.PipelineExecutionChangeEvent) PipelineExecutionTraceKey(org.guvnor.ala.ui.model.PipelineExecutionTraceKey) Test(org.junit.Test)

Example 7 with PipelineExecutionChangeEvent

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

the class RuntimeServiceImpl method deletePipelineExecution.

@Override
public void deletePipelineExecution(final PipelineExecutionTraceKey pipelineExecutionTraceKey) {
    checkNotNull("pipelineExecutionTraceKey", pipelineExecutionTraceKey);
    pipelineService.deletePipelineExecution(pipelineExecutionTraceKey.getId());
    pipelineExecutionChangeEvent.fire(new PipelineExecutionChangeEvent(PipelineExecutionChange.DELETED, pipelineExecutionTraceKey));
}
Also used : PipelineExecutionChangeEvent(org.guvnor.ala.ui.events.PipelineExecutionChangeEvent)

Example 8 with PipelineExecutionChangeEvent

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

the class RuntimeServiceImplTest method testDeletePipelineExecution.

@Test
public void testDeletePipelineExecution() {
    PipelineExecutionTraceKey pipelineExecutionTraceKey = new PipelineExecutionTraceKey(PIPELINE_EXECUTION_ID);
    service.deletePipelineExecution(pipelineExecutionTraceKey);
    verify(pipelineService, times(1)).deletePipelineExecution(PIPELINE_EXECUTION_ID);
    verify(pipelineExecutionChangeEvent, times(1)).fire(new PipelineExecutionChangeEvent(PipelineExecutionChange.DELETED, pipelineExecutionTraceKey));
}
Also used : PipelineExecutionChangeEvent(org.guvnor.ala.ui.events.PipelineExecutionChangeEvent) PipelineExecutionTraceKey(org.guvnor.ala.ui.model.PipelineExecutionTraceKey) Test(org.junit.Test)

Aggregations

PipelineExecutionChangeEvent (org.guvnor.ala.ui.events.PipelineExecutionChangeEvent)8 PipelineExecutionTraceKey (org.guvnor.ala.ui.model.PipelineExecutionTraceKey)6 Test (org.junit.Test)6 ProviderSelectedEvent (org.guvnor.ala.ui.client.events.ProviderSelectedEvent)2 RuntimeListItem (org.guvnor.ala.ui.model.RuntimeListItem)2