use of com.thoughtworks.go.server.service.MaterialService in project gocd by gocd.
the class ConfigMaterialUpdaterTest method SetUp.
@Before
public void SetUp() {
repoConfigDataSource = mock(GoRepoConfigDataSource.class);
materialChecker = mock(MaterialChecker.class);
materialRepository = mock(MaterialRepository.class);
configCompleted = mock(ConfigMaterialUpdateCompletedTopic.class);
topic = mock(MaterialUpdateCompletedTopic.class);
materialService = mock(MaterialService.class);
material = new SvnMaterial("url", "tom", "pass", false);
when(materialRepository.folderFor(material)).thenReturn(folder);
poller = mock(MaterialPoller.class);
when(materialService.getPollerImplementation(any(Material.class))).thenReturn(poller);
Modification svnModification = new Modification("user", "commend", "em@il", new Date(), "1");
mods = revisions(material, svnModification);
when(materialRepository.findLatestModification(material)).thenReturn(mods);
configUpdater = new ConfigMaterialUpdater(repoConfigDataSource, materialRepository, materialChecker, configCompleted, topic, materialService, new TestSubprocessExecutionContext());
}
use of com.thoughtworks.go.server.service.MaterialService in project gocd by gocd.
the class MaterialDatabaseUpdaterIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
dbHelper.onSetUp();
testRepo = new GitTestRepo();
MaterialService slowMaterialService = new MaterialServiceWhichSlowsDownFirstTimeModificationCheck(materialRepository, goConfigService, securityService, packageRepositoryExtension, scmExtension);
LegacyMaterialChecker materialChecker = new LegacyMaterialChecker(slowMaterialService, subprocessExecutionContext);
ScmMaterialUpdater scmMaterialUpdater = new ScmMaterialUpdater(materialRepository, materialChecker, subprocessExecutionContext, slowMaterialService);
transactionTemplateWithInvocationCount = new TransactionTemplateWithInvocationCount(transactionTemplate);
updater = new MaterialDatabaseUpdater(materialRepository, serverHealthService, transactionTemplateWithInvocationCount, dependencyMaterialUpdater, scmMaterialUpdater, packageMaterialUpdater, pluggableSCMMaterialUpdater, materialExpansionService);
}
use of com.thoughtworks.go.server.service.MaterialService in project gocd by gocd.
the class LegacyMaterialCheckerTest method setUp.
@Before
public void setUp() {
materialService = mock(MaterialService.class);
checker = new LegacyMaterialChecker(materialService, null);
file = new File(".");
}
Aggregations