@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); }
@Override public List<PipelineConfig> getPipelineConfigs(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return pipelineService.getPipelineConfigs(page, pageSize, sort, sortOrder).getItems(); }
PipelineServiceBackendImpl implements PipelineServiceBackend { @Override public List<PipelineConfig> getPipelineConfigs(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return pipelineService.getPipelineConfigs(page, pageSize, sort, sortOrder).getItems(); } }
PipelineServiceBackendImpl implements PipelineServiceBackend { @Override public List<PipelineConfig> getPipelineConfigs(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return pipelineService.getPipelineConfigs(page, pageSize, sort, sortOrder).getItems(); } PipelineServiceBackendImpl(); @Inject  PipelineServiceBackendImpl(final PipelineService pipelineService); }
PipelineServiceBackendImpl implements PipelineServiceBackend { @Override public List<PipelineConfig> getPipelineConfigs(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return pipelineService.getPipelineConfigs(page, pageSize, sort, sortOrder).getItems(); } PipelineServiceBackendImpl(); @Inject  PipelineServiceBackendImpl(final PipelineService pipelineService); @Override List<PipelineConfig> getPipelineConfigs(Integer page,
                                                   Integer pageSize,
                                                   String sort,
                                                   boolean sortOrder); @Override List<PipelineConfig> getPipelineConfigs(ProviderType providerType,
                                                   Integer page,
                                                   Integer pageSize,
                                                   String sort,
                                                   boolean sortOrder); @Override List<String> getPipelineNames(ProviderType providerType,
                                         Integer page,
                                         Integer pageSize,
                                         String sort,
                                         boolean sortOrder); @Override String newPipeline(PipelineConfig pipelineConfig,
                              ProviderType providerType); @Override String newPipeline(PipelineConfig config); @Override String runPipeline(String id,
                              Input input,
                              boolean async); @Override void stopPipelineExecution(final String executionId); @Override void deletePipelineExecution(final String executionId); }
PipelineServiceBackendImpl implements PipelineServiceBackend { @Override public List<PipelineConfig> getPipelineConfigs(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return pipelineService.getPipelineConfigs(page, pageSize, sort, sortOrder).getItems(); } PipelineServiceBackendImpl(); @Inject  PipelineServiceBackendImpl(final PipelineService pipelineService); @Override List<PipelineConfig> getPipelineConfigs(Integer page,
                                                   Integer pageSize,
                                                   String sort,
                                                   boolean sortOrder); @Override List<PipelineConfig> getPipelineConfigs(ProviderType providerType,
                                                   Integer page,
                                                   Integer pageSize,
                                                   String sort,
                                                   boolean sortOrder); @Override List<String> getPipelineNames(ProviderType providerType,
                                         Integer page,
                                         Integer pageSize,
                                         String sort,
                                         boolean sortOrder); @Override String newPipeline(PipelineConfig pipelineConfig,
                              ProviderType providerType); @Override String newPipeline(PipelineConfig config); @Override String runPipeline(String id,
                              Input input,
                              boolean async); @Override void stopPipelineExecution(final String executionId); @Override void deletePipelineExecution(final String executionId);  }