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);
}
Aggregations