Search in sources :

Example 11 with PipelineExecutorTrace

use of org.guvnor.ala.pipeline.execution.PipelineExecutorTrace in project kie-wb-common by kiegroup.

the class InMemoryPipelineExecutorRegistryTest method getExecutorTraceByRuntimeId.

@Test
public void getExecutorTraceByRuntimeId() {
    RuntimeIdMock runtimeId = mock(RuntimeIdMock.class);
    when(runtimeId.getId()).thenReturn(RUNTIME_ID);
    PipelineExecutorTask task = mock(PipelineExecutorTask.class);
    when(task.getOutput()).thenReturn(runtimeId);
    when(trace.getTask()).thenReturn(task);
    pipelineExecutorRegistry.register(trace);
    PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(runtimeId);
    assertEquals(trace, result);
}
Also used : PipelineExecutorTrace(org.guvnor.ala.pipeline.execution.PipelineExecutorTrace) PipelineExecutorTask(org.guvnor.ala.pipeline.execution.PipelineExecutorTask) Test(org.junit.Test)

Example 12 with PipelineExecutorTrace

use of org.guvnor.ala.pipeline.execution.PipelineExecutorTrace in project kie-wb-common by kiegroup.

the class InMemoryPipelineExecutorRegistryTest method testRegister.

@Test
public void testRegister() {
    pipelineExecutorRegistry.register(trace);
    PipelineExecutorTrace result = pipelineExecutorRegistry.getExecutorTrace(PIPELINE_EXECUTION_ID);
    assertEquals(trace, result);
}
Also used : PipelineExecutorTrace(org.guvnor.ala.pipeline.execution.PipelineExecutorTrace) Test(org.junit.Test)

Aggregations

PipelineExecutorTrace (org.guvnor.ala.pipeline.execution.PipelineExecutorTrace)12 Test (org.junit.Test)9 PipelineExecutorTask (org.guvnor.ala.pipeline.execution.PipelineExecutorTask)3 InMemoryPipelineExecutorRegistryTest (org.guvnor.ala.registry.inmemory.InMemoryPipelineExecutorRegistryTest)3 ArrayList (java.util.ArrayList)1 PipelineExecutorException (org.guvnor.ala.pipeline.execution.PipelineExecutorException)1 Runtime (org.guvnor.ala.runtime.Runtime)1 BusinessException (org.guvnor.ala.services.exceptions.BusinessException)1 ExpectedException (org.junit.rules.ExpectedException)1 StartsWith (org.mockito.internal.matchers.StartsWith)1