use of com.thoughtworks.go.helper.SvnTestRepoWithExternal in project gocd by gocd.
the class MaterialDatabaseSvnWithExternalsUpdaterTest method shouldNotTryToSaveModificationForAnExternalThathasAlreadyBeenSaved.
@Test
public void shouldNotTryToSaveModificationForAnExternalThathasAlreadyBeenSaved() throws Exception {
updater.updateMaterial(material);
SvnTestRepoWithExternal otherRepo = new SvnTestRepoWithExternal(testRepoWithExternal.externalRepositoryUrl(), temporaryFolder);
SvnMaterial otherMaterial = new SvnMaterial(otherRepo.projectRepositoryUrl(), null, null, true);
updater.updateMaterial(otherMaterial);
MaterialRevisions materialRevisions = materialRepository.findLatestModification(otherMaterial);
assertThat(materialRevisions.numberOfRevisions(), is(2));
}
use of com.thoughtworks.go.helper.SvnTestRepoWithExternal in project gocd by gocd.
the class SvnExternalTest method copyRepository.
@BeforeClass
public static void copyRepository() throws IOException {
svnRepo = new SvnTestRepoWithExternal(temporaryFolder);
workingDir = svnRepo.projectRepositoryUrlAsFile();
}
use of com.thoughtworks.go.helper.SvnTestRepoWithExternal in project gocd by gocd.
the class MaterialDatabaseSvnWithExternalsUpdaterTest method shouldDetectChangesToExternals.
@Test
public void shouldDetectChangesToExternals() throws Exception {
((SvnTestRepoWithExternal) testRepo).checkInExternalFile("external.txt", "EXTERNAL");
updater.updateMaterial(material);
MaterialRevisions materialRevisions = materialRepository.findLatestModification(material);
assertThat(materialRevisions.numberOfRevisions(), is(2));
assertThat(materialRevisions.getMaterialRevision(1).getModification(0).getComment(), is("EXTERNAL"));
}
Aggregations