Search in sources :

Example 11 with StageFeedEntry

use of com.thoughtworks.go.domain.feed.stage.StageFeedEntry in project gocd by gocd.

the class StageAtomFeedsReaderTest method canGetAllStageUrlsInAStagesFeed.

@Test
public void canGetAllStageUrlsInAStagesFeed() throws Exception {
    when(stageDao.findAllCompletedStages(FeedModifier.Latest, -1, StageAtomFeedsReader.PAGE_SIZE)).thenReturn(Arrays.asList(feedEntry(2), feedEntry(1)));
    new StageAtomFeedsReader(stageDao).readFromLatest(stageFeedHandler, pipelineInstanceLoader);
    List<StageFeedEntry> list = stageFeedHandler.handledFeeds();
    assertEquals(2, list.size());
    assertEquals(2, list.get(0).getId());
    assertEquals(1, list.get(1).getId());
}
Also used : StageAtomFeedsReader(com.thoughtworks.studios.shine.cruise.stage.feeds.StageAtomFeedsReader) StageFeedEntry(com.thoughtworks.go.domain.feed.stage.StageFeedEntry) Test(org.junit.Test)

Aggregations

StageFeedEntry (com.thoughtworks.go.domain.feed.stage.StageFeedEntry)11 Test (org.junit.Test)9 FeedEntry (com.thoughtworks.go.domain.feed.FeedEntry)6 Author (com.thoughtworks.go.domain.feed.Author)5 FeedEntries (com.thoughtworks.go.domain.feed.FeedEntries)5 Arrays.asList (java.util.Arrays.asList)4 StageAtomFeedsReader (com.thoughtworks.studios.shine.cruise.stage.feeds.StageAtomFeedsReader)3 Modification (com.thoughtworks.go.domain.materials.Modification)1 MingleCard (com.thoughtworks.go.server.ui.MingleCard)1 ModificationForPipeline (com.thoughtworks.go.server.ui.ModificationForPipeline)1 SqlMapClientTemplate (org.springframework.orm.ibatis.SqlMapClientTemplate)1