Search in sources :

Example 11 with StageConfigIdentifier

use of com.thoughtworks.go.domain.StageConfigIdentifier in project gocd by gocd.

the class StageStatusCacheTest method shouldLoadMostRecentInstanceFromDBForTheFirstTime.

@Test
public void shouldLoadMostRecentInstanceFromDBForTheFirstTime() throws SQLException {
    pipelineFixture.createdPipelineWithAllStagesPassed();
    Pipeline pipeline = pipelineFixture.createPipelineWithFirstStageScheduled();
    Stage expect = pipeline.getStages().byName(pipelineFixture.devStage);
    assertThat(stageStatusCache.currentStage(new StageConfigIdentifier(pipelineFixture.pipelineName, pipelineFixture.devStage)), is(expect));
}
Also used : StageConfigIdentifier(com.thoughtworks.go.domain.StageConfigIdentifier) Stage(com.thoughtworks.go.domain.Stage) Pipeline(com.thoughtworks.go.domain.Pipeline) Test(org.junit.Test)

Aggregations

StageConfigIdentifier (com.thoughtworks.go.domain.StageConfigIdentifier)11 Test (org.junit.Test)8 Stage (com.thoughtworks.go.domain.Stage)4 StageDao (com.thoughtworks.go.server.dao.StageDao)3 Pipeline (com.thoughtworks.go.domain.Pipeline)2 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)1 NotificationFilter (com.thoughtworks.go.domain.NotificationFilter)1 StageEvent (com.thoughtworks.go.domain.StageEvent)1 StageIdentifier (com.thoughtworks.go.domain.StageIdentifier)1 StageResult (com.thoughtworks.go.domain.StageResult)1 User (com.thoughtworks.go.domain.User)1 Users (com.thoughtworks.go.domain.Users)1 StringContains.containsString (org.hamcrest.core.StringContains.containsString)1 Expectations (org.jmock.Expectations)1 Mockery (org.jmock.Mockery)1 Matchers.anyString (org.mockito.Matchers.anyString)1