protected void refresh(final PipelineExecutionTraceKey pipelineExecutionTraceKey) { runtimeService.call(getLoadItemSuccessCallback(), getDefaultErrorCallback()).getRuntimeItem(pipelineExecutionTraceKey); }
protected void refresh(final PipelineExecutionTraceKey pipelineExecutionTraceKey) { runtimeService.call(getLoadItemSuccessCallback(), getDefaultErrorCallback()).getRuntimeItem(pipelineExecutionTraceKey); }
protected void refresh(final RuntimeKey runtimeKey) { runtimeService.call(getLoadItemSuccessCallback(), getDefaultErrorCallback()).getRuntimeItem(runtimeKey); }
protected void refresh(final RuntimeKey runtimeKey) { runtimeService.call(getLoadItemSuccessCallback(), getDefaultErrorCallback()).getRuntimeItem(runtimeKey); }
@Test public void getRuntimeItemByRuntimeKeyNotExisting() { ProviderKey providerKey = mock(ProviderKey.class); RuntimeKey runtimeKey = new RuntimeKey(providerKey, RUNTIME_ID); List<RuntimeQueryResultItem> singleResult = new ArrayList<>(); when(runtimeProvisioningService.executeQuery(any(RuntimeQuery.class))).thenReturn(singleResult); RuntimeListItem result = service.getRuntimeItem(runtimeKey); assertNull(result); }
@Test public void getRuntimeItemByPipelineExecutionKeyNotExisting() { PipelineExecutionTraceKey traceKey = new PipelineExecutionTraceKey(PIPELINE_EXECUTION_ID); List<RuntimeQueryResultItem> singleResult = new ArrayList<>(); when(runtimeProvisioningService.executeQuery(any(RuntimeQuery.class))).thenReturn(singleResult); RuntimeListItem result = service.getRuntimeItem(traceKey); assertNull(result); }
@Test public void getRuntimeItemByRuntimeKeyNotExisting() { ProviderKey providerKey = mock(ProviderKey.class); RuntimeKey runtimeKey = new RuntimeKey(providerKey, RUNTIME_ID); List<RuntimeQueryResultItem> singleResult = new ArrayList<>(); when(runtimeProvisioningService.executeQuery(any(RuntimeQuery.class))).thenReturn(singleResult); RuntimeListItem result = service.getRuntimeItem(runtimeKey); assertNull(result); }
@Test public void getRuntimeItemByPipelineExecutionKeyNotExisting() { PipelineExecutionTraceKey traceKey = new PipelineExecutionTraceKey(PIPELINE_EXECUTION_ID); List<RuntimeQueryResultItem> singleResult = new ArrayList<>(); when(runtimeProvisioningService.executeQuery(any(RuntimeQuery.class))).thenReturn(singleResult); RuntimeListItem result = service.getRuntimeItem(traceKey); assertNull(result); }
@Test public void getRuntimeItemByRuntimeKeyExisting() { ProviderKey providerKey = mock(ProviderKey.class); RuntimeKey runtimeKey = new RuntimeKey(providerKey, RUNTIME_ID); List<RuntimeQueryResultItem> singleResult = mockRuntimeQueryResultItemList(1); when(runtimeProvisioningService.executeQuery(any(RuntimeQuery.class))).thenReturn(singleResult); RuntimeListItem expectedItem = buildExpectedResult(singleResult).iterator().next(); RuntimeListItem result = service.getRuntimeItem(runtimeKey); assertEquals(expectedItem, result); }
@Test public void getRuntimeItemByPipelineExecutionKeyExisting() { PipelineExecutionTraceKey traceKey = new PipelineExecutionTraceKey(PIPELINE_EXECUTION_ID); List<RuntimeQueryResultItem> singleResult = mockRuntimeQueryResultItemList(1); when(runtimeProvisioningService.executeQuery(any(RuntimeQuery.class))).thenReturn(singleResult); RuntimeListItem expectedItem = buildExpectedResult(singleResult).iterator().next(); RuntimeListItem result = service.getRuntimeItem(traceKey); assertEquals(expectedItem, result); }
@Test public void getRuntimeItemByRuntimeKeyExisting() { ProviderKey providerKey = mock(ProviderKey.class); RuntimeKey runtimeKey = new RuntimeKey(providerKey, RUNTIME_ID); List<RuntimeQueryResultItem> singleResult = mockRuntimeQueryResultItemList(1); when(runtimeProvisioningService.executeQuery(any(RuntimeQuery.class))).thenReturn(singleResult); RuntimeListItem expectedItem = buildExpectedResult(singleResult).iterator().next(); RuntimeListItem result = service.getRuntimeItem(runtimeKey); assertEquals(expectedItem, result); }
@Test public void getRuntimeItemByPipelineExecutionKeyExisting() { PipelineExecutionTraceKey traceKey = new PipelineExecutionTraceKey(PIPELINE_EXECUTION_ID); List<RuntimeQueryResultItem> singleResult = mockRuntimeQueryResultItemList(1); when(runtimeProvisioningService.executeQuery(any(RuntimeQuery.class))).thenReturn(singleResult); RuntimeListItem expectedItem = buildExpectedResult(singleResult).iterator().next(); RuntimeListItem result = service.getRuntimeItem(traceKey); assertEquals(expectedItem, result); }