/** * 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 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); }