Search in sources :

Example 1 with PipelineConfig

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);
}
Also used : PipelineConfig(org.guvnor.ala.pipeline.PipelineConfig) Test(org.junit.Test)

Example 2 with PipelineConfig

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);
}
Also used : PipelineConfig(org.guvnor.ala.pipeline.PipelineConfig) PipelineConfigsList(org.guvnor.ala.services.api.itemlist.PipelineConfigsList) Test(org.junit.Test)

Example 3 with PipelineConfig

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);
}
Also used : PipelineConfig(org.guvnor.ala.pipeline.PipelineConfig) PipelineConfigsList(org.guvnor.ala.services.api.itemlist.PipelineConfigsList) Test(org.junit.Test)

Example 4 with PipelineConfig

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);
}
Also used : PipelineConfig(org.guvnor.ala.pipeline.PipelineConfig) Test(org.junit.Test)

Aggregations

PipelineConfig (org.guvnor.ala.pipeline.PipelineConfig)4 Test (org.junit.Test)4 PipelineConfigsList (org.guvnor.ala.services.api.itemlist.PipelineConfigsList)2