use of com.thoughtworks.go.server.persistence.PipelineRepository in project gocd by gocd.
the class PipelineTimelineTest method setUp.
@BeforeEach
public void setUp() throws Exception {
now = new DateTime();
pipelineRepository = mock(PipelineRepository.class);
materials = Arrays.asList("first", "second", "third", "fourth");
first = PipelineMaterialModificationMother.modification(1, materials, Arrays.asList(now, now.plusMinutes(1), now.plusMinutes(2), now.plusMinutes(3)), 1, "111", "pipeline");
second = PipelineMaterialModificationMother.modification(2, materials, Arrays.asList(now, now.plusMinutes(2), now.plusMinutes(1), now.plusMinutes(2)), 2, "222", "pipeline");
third = PipelineMaterialModificationMother.modification(3, materials, Arrays.asList(now, now.plusMinutes(2), now.plusMinutes(1), now.plusMinutes(3)), 3, "333", "pipeline");
fourth = PipelineMaterialModificationMother.modification(4, materials, Arrays.asList(now, now.plusMinutes(2), now.plusMinutes(3), now.plusMinutes(2)), 4, "444", "pipeline");
pipelineName = "pipeline";
transactionTemplate = mock(TransactionTemplate.class);
transactionSynchronizationManager = mock(TransactionSynchronizationManager.class);
}
use of com.thoughtworks.go.server.persistence.PipelineRepository in project gocd by gocd.
the class GoConfigServiceTest method setup.
@BeforeEach
public void setup() throws Exception {
new SystemEnvironment().setProperty(SystemEnvironment.ENFORCE_SERVER_IMMUTABILITY, "N");
configRepo = mock(ConfigRepository.class);
goConfigDao = mock(GoConfigDao.class);
pipelineRepository = mock(PipelineRepository.class);
systemEnvironment = mock(SystemEnvironment.class);
cruiseConfig = unchangedConfig();
expectLoad(cruiseConfig);
this.clock = mock(Clock.class);
goCache = mock(GoCache.class);
instanceFactory = mock(InstanceFactory.class);
ConfigElementImplementationRegistry registry = ConfigElementImplementationRegistryMother.withNoPlugins();
goConfigService = new GoConfigService(goConfigDao, this.clock, new GoConfigMigration(new TimeProvider(), registry), goCache, configRepo, registry, instanceFactory, mock(CachedGoPartials.class), systemEnvironment);
}
use of com.thoughtworks.go.server.persistence.PipelineRepository in project gocd by gocd.
the class PipelineSelectionsServiceTest method setup.
@BeforeEach
public void setup() throws Exception {
new SystemEnvironment().setProperty(SystemEnvironment.ENFORCE_SERVER_IMMUTABILITY, "N");
goConfigDao = mock(GoConfigDao.class);
pipelineRepository = mock(PipelineRepository.class);
CruiseConfig cruiseConfig = unchangedConfig();
expectLoad(cruiseConfig);
Clock clock = mock(Clock.class);
when(clock.currentTime()).thenReturn(FIXED_DATE);
userDao = mock(UserDao.class);
goConfigService = mock(GoConfigService.class);
pipelineSelectionsService = new PipelineSelectionsService(pipelineRepository, goConfigService, clock);
}
Aggregations