Search in sources :

Example 1 with UserDao

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

the class GoConfigServiceTest method setup.

@Before
public void setup() throws Exception {
    new SystemEnvironment().setProperty(SystemEnvironment.ENFORCE_SERVERID_MUTABILITY, "N");
    configRepo = mock(ConfigRepository.class);
    goConfigDao = mock(GoConfigDao.class);
    pipelineRepository = mock(PipelineRepository.class);
    pipelinePauseService = mock(PipelinePauseService.class);
    systemEnvironment = mock(SystemEnvironment.class);
    cruiseConfig = unchangedConfig();
    expectLoad(cruiseConfig);
    this.clock = mock(Clock.class);
    goCache = mock(GoCache.class);
    instanceFactory = mock(InstanceFactory.class);
    userDao = mock(UserDao.class);
    stub(systemEnvironment.optimizeFullConfigSave()).toReturn(false);
    ConfigElementImplementationRegistry registry = ConfigElementImplementationRegistryMother.withNoPlugins();
    goConfigService = new GoConfigService(goConfigDao, pipelineRepository, this.clock, new GoConfigMigration(configRepo, new TimeProvider(), new ConfigCache(), registry), goCache, configRepo, registry, instanceFactory, mock(CachedGoPartials.class), systemEnvironment);
}
Also used : ConfigRepository(com.thoughtworks.go.service.ConfigRepository) UserDao(com.thoughtworks.go.server.dao.UserDao) ConfigElementImplementationRegistry(com.thoughtworks.go.config.registry.ConfigElementImplementationRegistry) PipelineRepository(com.thoughtworks.go.server.persistence.PipelineRepository) GoCache(com.thoughtworks.go.server.cache.GoCache) Before(org.junit.Before)

Aggregations

ConfigElementImplementationRegistry (com.thoughtworks.go.config.registry.ConfigElementImplementationRegistry)1 GoCache (com.thoughtworks.go.server.cache.GoCache)1 UserDao (com.thoughtworks.go.server.dao.UserDao)1 PipelineRepository (com.thoughtworks.go.server.persistence.PipelineRepository)1 ConfigRepository (com.thoughtworks.go.service.ConfigRepository)1 Before (org.junit.Before)1