Search in sources :

Example 1 with ShineDao

use of com.thoughtworks.go.server.dao.sparql.ShineDao 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 ShineDao

use of com.thoughtworks.go.server.dao.sparql.ShineDao in project gocd by gocd.

the class FailureServiceTest method setUp.

@Before
public void setUp() {
    shineDao = mock(ShineDao.class);
    securityService = mock(SecurityService.class);
    stageFinder = mock(StageFinder.class);
    failureService = new FailureService(securityService, shineDao, stageFinder);
    username = new Username(new CaseInsensitiveString("foo"));
    jobIdentifier = new JobIdentifier(new StageIdentifier("pipeline", 10, "stage", "5"), "job");
    result = new HttpLocalizedOperationResult();
}
Also used : StageIdentifier(com.thoughtworks.go.domain.StageIdentifier) HttpLocalizedOperationResult(com.thoughtworks.go.server.service.result.HttpLocalizedOperationResult) ShineDao(com.thoughtworks.go.server.dao.sparql.ShineDao) Username(com.thoughtworks.go.server.domain.Username) JobIdentifier(com.thoughtworks.go.domain.JobIdentifier) StageFinder(com.thoughtworks.go.domain.StageFinder) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString) Before(org.junit.Before)

Example 3 with ShineDao

use of com.thoughtworks.go.server.dao.sparql.ShineDao 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)3 Before (org.junit.Before)3 InMemoryEmailNotificationTopic (com.thoughtworks.go.server.messaging.InMemoryEmailNotificationTopic)2 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)1 JobIdentifier (com.thoughtworks.go.domain.JobIdentifier)1 StageFinder (com.thoughtworks.go.domain.StageFinder)1 StageIdentifier (com.thoughtworks.go.domain.StageIdentifier)1 PipelineWithTwoStages (com.thoughtworks.go.fixture.PipelineWithTwoStages)1 Username (com.thoughtworks.go.server.domain.Username)1 StageNotificationListener (com.thoughtworks.go.server.messaging.StageNotificationListener)1 HttpLocalizedOperationResult (com.thoughtworks.go.server.service.result.HttpLocalizedOperationResult)1 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)1