public void testMultipleRepositories() throws Exception {
// fetch the current workspaces
FreeStyleProject p = createFreeStyleProject();
String svnBase = "file://" + new CopyExisting(getClass().getResource("/svn-repo.zip")).allocate().toURI().toURL().getPath();
SubversionSCM scm = new SubversionSCM(
Arrays.asList(new ModuleLocation(svnBase + "trunk", "trunk")),
new UpdateUpdater(), null, null, null, null, null, null);
p.setScm(scm);
Run r1 = p.scheduleBuild2(0, new Cause.UserIdCause()).get();
assertLogContains("Cleaning local Directory trunk", r1);
scm = new SubversionSCM(
Arrays.asList(new ModuleLocation(svnBase + "trunk", "trunk"), new ModuleLocation(svnBase + "branches", "branches")),
new UpdateUpdater(), null, null, null, null, null, null);
p.setScm(scm);
Run r2 = p.scheduleBuild2(0, new Cause.UserIdCause()).get();
assertLogContains("Updating " + svnBase + "trunk", r2);
assertLogContains("Cleaning local Directory branches", r2);