Search in sources :

Example 11 with TestTransactionSynchronizationManager

use of com.thoughtworks.go.server.transaction.TestTransactionSynchronizationManager in project gocd by gocd.

the class StageServiceTest method setUp.

@Before
public void setUp() throws Exception {
    stageDao = mock(StageDao.class);
    pipelineDao = mock(PipelineDao.class);
    jobInstanceService = mock(JobInstanceService.class);
    securityService = mock(SecurityService.class);
    pipelineNames = asList(new CaseInsensitiveString("blah-pipeline"));
    user = new Username(new CaseInsensitiveString("poovan"));
    operationResult = new HttpLocalizedOperationResult();
    cruiseConfig = mock(BasicCruiseConfig.class);
    goConfigService = mock(GoConfigService.class);
    changesetService = mock(ChangesetService.class);
    goCache = mock(GoCache.class);
    transactionSynchronizationManager = new TestTransactionSynchronizationManager();
    transactionTemplate = new TestTransactionTemplate(transactionSynchronizationManager);
}
Also used : StageDao(com.thoughtworks.go.server.dao.StageDao) TestTransactionTemplate(com.thoughtworks.go.server.transaction.TestTransactionTemplate) TestTransactionSynchronizationManager(com.thoughtworks.go.server.transaction.TestTransactionSynchronizationManager) HttpLocalizedOperationResult(com.thoughtworks.go.server.service.result.HttpLocalizedOperationResult) Username(com.thoughtworks.go.server.domain.Username) GoCache(com.thoughtworks.go.server.cache.GoCache) PipelineDao(com.thoughtworks.go.server.dao.PipelineDao) Before(org.junit.Before)

Aggregations

TestTransactionSynchronizationManager (com.thoughtworks.go.server.transaction.TestTransactionSynchronizationManager)11 Before (org.junit.Before)8 TestTransactionTemplate (com.thoughtworks.go.server.transaction.TestTransactionTemplate)7 StubGoCache (com.thoughtworks.go.server.service.StubGoCache)4 Test (org.junit.Test)3 GoCache (com.thoughtworks.go.server.cache.GoCache)2 PipelineSqlMapDao (com.thoughtworks.go.server.dao.PipelineSqlMapDao)2 PipelineTimeline (com.thoughtworks.go.server.domain.PipelineTimeline)2 FeatureToggle (com.thoughtworks.go.server.domain.support.toggle.FeatureToggle)2 FeatureToggles (com.thoughtworks.go.server.domain.support.toggle.FeatureToggles)2 SchedulingPerformanceLogger (com.thoughtworks.go.server.perf.SchedulingPerformanceLogger)2 MaterialRepository (com.thoughtworks.go.server.persistence.MaterialRepository)2 TransactionTemplate (com.thoughtworks.go.server.transaction.TransactionTemplate)2 ServerHealthService (com.thoughtworks.go.serverhealth.ServerHealthService)2 TimeProvider (com.thoughtworks.go.util.TimeProvider)2 Cache (com.opensymphony.oscache.base.Cache)1 Cloner (com.rits.cloning.Cloner)1 JobStatusCache (com.thoughtworks.go.domain.activity.JobStatusCache)1 Localizer (com.thoughtworks.go.i18n.Localizer)1 PipelineDao (com.thoughtworks.go.server.dao.PipelineDao)1