Search in sources :

Example 1 with StageNotificationListener

use of com.thoughtworks.go.server.messaging.StageNotificationListener in project gocd by gocd.

the class StageNotificationServiceIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    stageService = mock(StageService.class);
    shineDao = mock(ShineDao.class);
    stageNotificationService = new StageNotificationService(pipelineService, userService, inMemoryEmailNotificationTopic, systemEnvironment, stageService, serverConfigService, shineDao);
    stageNotificationListener = new StageNotificationListener(stageNotificationService, goConfigService, stageResultTopic);
    dbHelper.onSetUp();
    configFileHelper.onSetUp();
    configFileHelper.usingEmptyConfigFileWithLicenseAllowsUnlimitedAgents();
    configFileHelper.usingCruiseConfigDao(goConfigDao);
    pipelineFixture = new PipelineWithTwoStages(materialRepository, transactionTemplate, temporaryFolder);
    pipelineFixture.usingConfigHelper(configFileHelper).usingDbHelper(dbHelper).onSetUp();
    configFileHelper.enableSecurity();
    inMemoryEmailNotificationTopic = new InMemoryEmailNotificationTopic();
    stageNotificationService.setEmailNotificationTopic(inMemoryEmailNotificationTopic);
}
Also used : ShineDao(com.thoughtworks.go.server.dao.sparql.ShineDao) PipelineWithTwoStages(com.thoughtworks.go.fixture.PipelineWithTwoStages) InMemoryEmailNotificationTopic(com.thoughtworks.go.server.messaging.InMemoryEmailNotificationTopic) StageNotificationListener(com.thoughtworks.go.server.messaging.StageNotificationListener) Before(org.junit.Before)

Aggregations

PipelineWithTwoStages (com.thoughtworks.go.fixture.PipelineWithTwoStages)1 ShineDao (com.thoughtworks.go.server.dao.sparql.ShineDao)1 InMemoryEmailNotificationTopic (com.thoughtworks.go.server.messaging.InMemoryEmailNotificationTopic)1 StageNotificationListener (com.thoughtworks.go.server.messaging.StageNotificationListener)1 Before (org.junit.Before)1