Search in sources :

Example 1 with InMemoryEmailNotificationTopic

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

the class StageNotificationServiceTest method setUp.

@Before
public void setUp() {
    pipelineService = mock(PipelineService.class);
    userService = mock(UserService.class);
    systemEnvironment = mock(SystemEnvironment.class);
    stageService = mock(StageService.class);
    inMemoryEmailNotificationTopic = new InMemoryEmailNotificationTopic();
    serverConfigService = mock(ServerConfigService.class);
    shineDao = mock(ShineDao.class);
    stageNotificationService = new StageNotificationService(pipelineService, userService, inMemoryEmailNotificationTopic, systemEnvironment, stageService, serverConfigService, shineDao);
    stageIdentifier = new StageIdentifier("go", 1, "go-1", "dev", "2");
    instanceFactory = new InstanceFactory();
}
Also used : SystemEnvironment(com.thoughtworks.go.util.SystemEnvironment) ShineDao(com.thoughtworks.go.server.dao.sparql.ShineDao) InMemoryEmailNotificationTopic(com.thoughtworks.go.server.messaging.InMemoryEmailNotificationTopic) Before(org.junit.Before)

Example 2 with InMemoryEmailNotificationTopic

use of com.thoughtworks.go.server.messaging.InMemoryEmailNotificationTopic 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

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