Search in sources :

Example 41 with StageInstanceModels

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()));
}
Also used : Username(com.thoughtworks.go.server.domain.Username) StageInstanceModels(com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModels) StageHistoryEntry(com.thoughtworks.go.presentation.pipelinehistory.StageHistoryEntry) Test(org.junit.jupiter.api.Test)

Aggregations

StageInstanceModels (com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModels)41 PipelineInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel)14 Test (org.junit.Test)14 Test (org.junit.jupiter.api.Test)14 StageInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.StageInstanceModel)13 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)9 PipelineInstanceModels (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModels)8 PipelineModel (com.thoughtworks.go.presentation.pipelinehistory.PipelineModel)7 HgMaterial (com.thoughtworks.go.config.materials.mercurial.HgMaterial)6 NullStageHistoryItem (com.thoughtworks.go.presentation.pipelinehistory.NullStageHistoryItem)6 ScheduleTestUtil (com.thoughtworks.go.server.service.ScheduleTestUtil)6 StageIdentifier (com.thoughtworks.go.domain.StageIdentifier)5 Username (com.thoughtworks.go.server.domain.Username)4 Pagination (com.thoughtworks.go.server.util.Pagination)4 MaterialConfigs (com.thoughtworks.go.config.materials.MaterialConfigs)3 PipelineDependencyGraphOld (com.thoughtworks.go.domain.PipelineDependencyGraphOld)3 StageHistoryEntry (com.thoughtworks.go.presentation.pipelinehistory.StageHistoryEntry)3 PipelineConfig (com.thoughtworks.go.config.PipelineConfig)2 StageStatusCache (com.thoughtworks.go.domain.activity.StageStatusCache)2 StageStatusTopic (com.thoughtworks.go.server.messaging.StageStatusTopic)2