use of pipelite.service.ProcessService in project pipelite by enasequence.
the class ProcessEntityCreatorTest method test.
@Test
public void test() {
TestPipeline testPipeline = new TestPipeline();
ProcessService service = mock(ProcessService.class);
ProcessEntityCreator creator = spy(new ProcessEntityCreator(testPipeline, service));
when(service.createExecution(any(), any(), any())).thenAnswer(invocation -> {
String pipelineName = invocation.getArgument(0);
String processId = invocation.getArgument(1);
return processEntity(pipelineName, processId);
});
assertThat(creator.create(PROCESS_CNT)).isEqualTo(PROCESS_CNT);
assertThat(testPipeline.confirmedProcessCount()).isEqualTo(PROCESS_CNT);
}
Aggregations