use of org.guvnor.ala.pipeline.PipelineConfig in project kie-wb-common by kiegroup.
the class PipelineServiceBackendImplTest method testNewPipeline.
@Test
public void testNewPipeline() {
PipelineConfig pipelineConfig = mock(PipelineConfig.class);
when(pipelineService.newPipeline(pipelineConfig)).thenReturn(PIPELINE_NAME);
String result = pipelineServiceBackend.newPipeline(pipelineConfig);
verify(pipelineService, times(1)).newPipeline(pipelineConfig);
assertEquals(PIPELINE_NAME, result);
}
use of org.guvnor.ala.pipeline.PipelineConfig in project kie-wb-common by kiegroup.
the class PipelineServiceBackendImplTest method testGetPipelineConfigsForProviderType.
@Test
public void testGetPipelineConfigsForProviderType() {
List<PipelineConfig> values = mockList(PipelineConfig.class, ELEMENTS_COUNT);
PipelineConfigsList list = new PipelineConfigsList(values);
when(pipelineService.getPipelineConfigs(PROVIDER_TYPE_NAME, PROVIDER_TYPE_VERSION, PAGE, PAGE_SIZE, SORT, SORT_ORDER)).thenReturn(list);
List<PipelineConfig> result = pipelineServiceBackend.getPipelineConfigs(providerType, PAGE, PAGE_SIZE, SORT, SORT_ORDER);
verify(pipelineService, times(1)).getPipelineConfigs(PROVIDER_TYPE_NAME, PROVIDER_TYPE_VERSION, PAGE, PAGE_SIZE, SORT, SORT_ORDER);
assertEquals(result, values);
}
use of org.guvnor.ala.pipeline.PipelineConfig in project kie-wb-common by kiegroup.
the class PipelineServiceBackendImplTest method testGetPipelineConfigs.
@Test
public void testGetPipelineConfigs() {
List<PipelineConfig> values = mockList(PipelineConfig.class, ELEMENTS_COUNT);
PipelineConfigsList list = new PipelineConfigsList(values);
when(pipelineService.getPipelineConfigs(PAGE, PAGE_SIZE, SORT, SORT_ORDER)).thenReturn(list);
List<PipelineConfig> result = pipelineServiceBackend.getPipelineConfigs(PAGE, PAGE_SIZE, SORT, SORT_ORDER);
verify(pipelineService, times(1)).getPipelineConfigs(PAGE, PAGE_SIZE, SORT, SORT_ORDER);
assertEquals(result, values);
}
use of org.guvnor.ala.pipeline.PipelineConfig in project kie-wb-common by kiegroup.
the class PipelineServiceBackendImplTest method testNewPipelineForProvider.
@Test
public void testNewPipelineForProvider() {
PipelineConfig pipelineConfig = mock(PipelineConfig.class);
when(pipelineService.newPipeline(pipelineConfig, providerType)).thenReturn(PIPELINE_NAME);
String result = pipelineServiceBackend.newPipeline(pipelineConfig, providerType);
verify(pipelineService, times(1)).newPipeline(pipelineConfig, providerType);
assertEquals(PIPELINE_NAME, result);
}
Aggregations