use of com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModels in project gocd by gocd.
the class StageServiceIntegrationTest method shouldReturnThePipelineHistoryAfterTheSpecifiedCursor.
@Test
public void shouldReturnThePipelineHistoryAfterTheSpecifiedCursor() {
StageHistoryEntry[] stages = createFiveStages();
StageInstanceModels history = stageService.findStageHistoryViaCursor(new Username(new CaseInsensitiveString("admin1")), savedPipeline.getName(), savedPipeline.getFirstStage().getName(), stages[2].getId(), 0, 10);
assertThat(history.size(), is(2));
assertThat(history.get(0).getId(), is(stages[1].getId()));
assertThat(history.get(1).getId(), is(stages[0].getId()));
}
Aggregations