/** * Tests the case when the item is a Runtime with no pipeline execution trace. */ @Test public void testSetupRuntimeWithNoTrace() { runtime = mockRuntime(); item = new RuntimeListItem(RUNTIME_NAME, runtime); presenter.setup(item); verify(pipelinePresenter, times(1)).clearStages(); verify(view, times(1)).setup(RUNTIME_NAME, CREATED_DATE, DEFAULT_PIPELINE_NAME); verify(view, times(1)).setEndpoint(ENDPOINT); verify(pipelinePresenter, never()).addStage(any(IsElement.class)); }
/** * Tests the case when the item is a Runtime with no pipeline execution trace. */ @Test public void testSetupRuntimeWithNoTrace() { runtime = mockRuntime(); item = new RuntimeListItem(RUNTIME_NAME, runtime); presenter.setup(item); verify(pipelinePresenter, times(1)).clearStages(); verify(view, times(1)).setup(RUNTIME_NAME, CREATED_DATE, DEFAULT_PIPELINE_NAME); verify(view, times(1)).setEndpoint(ENDPOINT); verify(pipelinePresenter, never()).addStage(any(IsElement.class)); }
/** * Tests the case when the item is a PipelineExecutionTrace execution trace. */ @Test public void testSetupPipelineExecutionTrace() { preparePipelineExecutionTraceSetup(); RuntimeListItem item = new RuntimeListItem(RUNTIME_NAME, trace); presenter.setup(item); verify(pipelinePresenter, times(2)).clearStages(); verify(view, times(1)).setup(RUNTIME_NAME, "", PIPELINE_NAME); verifyPipelineWasSet(trace, displayableStages); }
/** * Tests the case when the item is a Runtime with pipeline execution trace. */ @Test public void testSetupRuntimeWithTrace() { runtime = mockRuntime(); preparePipelineExecutionTraceSetup(); item = new RuntimeListItem(RUNTIME_NAME, trace); //set the trace on the runtime. runtime.setPipelineTrace(trace); item = new RuntimeListItem(RUNTIME_NAME, runtime); presenter.setup(item); verify(pipelinePresenter, times(2)).clearStages(); verify(view, times(1)).setup(RUNTIME_NAME, CREATED_DATE, PIPELINE_NAME); verify(view, times(1)).setEndpoint(ENDPOINT); verifyPipelineWasSet(trace, displayableStages); }
/** * Tests the case when the item is a Runtime with pipeline execution trace. */ @Test public void testSetupRuntimeWithTrace() { runtime = mockRuntime(); preparePipelineExecutionTraceSetup(); item = new RuntimeListItem(RUNTIME_NAME, trace); //set the trace on the runtime. runtime.setPipelineTrace(trace); item = new RuntimeListItem(RUNTIME_NAME, runtime); presenter.setup(item); verify(pipelinePresenter, times(2)).clearStages(); verify(view, times(1)).setup(RUNTIME_NAME, CREATED_DATE, PIPELINE_NAME); verify(view, times(1)).setEndpoint(ENDPOINT); verifyPipelineWasSet(trace, displayableStages); }
private void setupRuntime(RuntimeListItem item) { String itemLabel = item.getItemLabel(); String pipelineName = SYSTEM_PIPELINE_NAME; String createdDate = item.getRuntime().getCreatedDate(); String endpoint = ""; Runtime runtime = item.getRuntime(); PipelineExecutionTrace trace = runtime.getPipelineTrace(); if (trace != null) { pipelineName = trace.getPipeline().getKey().getId(); setupPipeline(trace); } view.setup(itemLabel, createdDate, pipelineName); if (runtime.getEndpoint() != null) { endpoint = runtime.getEndpoint(); } view.setEndpoint(endpoint); processRuntimeStatus(runtime); }
private void setupRuntime(RuntimeListItem item) { String itemLabel = item.getItemLabel(); String pipelineName = SYSTEM_PIPELINE_NAME; String createdDate = item.getRuntime().getCreatedDate(); String endpoint = ""; Runtime runtime = item.getRuntime(); PipelineExecutionTrace trace = runtime.getPipelineTrace(); if (trace != null) { pipelineName = trace.getPipeline().getKey().getId(); setupPipeline(trace); } view.setup(itemLabel, createdDate, pipelineName); if (runtime.getEndpoint() != null) { endpoint = runtime.getEndpoint(); } view.setEndpoint(endpoint); processRuntimeStatus(runtime); }
/** * Tests the case when the item is a PipelineExecutionTrace execution trace. */ @Test public void testSetupPipelineExecutionTrace() { preparePipelineExecutionTraceSetup(); RuntimeListItem item = new RuntimeListItem(RUNTIME_NAME, trace); presenter.setup(item); verify(pipelinePresenter, times(2)).clearStages(); verify(view, times(1)).setup(RUNTIME_NAME, "", PIPELINE_NAME); verifyPipelineWasSet(trace, displayableStages); }
private void setupPipelineTrace(RuntimeListItem item) { PipelineExecutionTrace trace = item.getPipelineTrace(); String itemLabel = item.getItemLabel(); String pipelineName = trace.getPipeline().getKey().getId(); String createdDate = ""; view.setup(itemLabel, createdDate, pipelineName); setupPipeline(trace); processPipelineStatus(trace.getPipelineStatus()); }
private void setupPipelineTrace(RuntimeListItem item) { PipelineExecutionTrace trace = item.getPipelineTrace(); String itemLabel = item.getItemLabel(); String pipelineName = trace.getPipeline().getKey().getId(); String createdDate = ""; view.setup(itemLabel, createdDate, pipelineName); setupPipeline(trace); processPipelineStatus(trace.getPipelineStatus()); }