Made test classes and made BridgedProject class.

This commit is contained in:
Winston Li
2014-11-05 15:46:40 +00:00
parent 8785256229
commit f2c987c658
7 changed files with 236 additions and 149 deletions
@@ -0,0 +1,16 @@
package uk.ac.ic.wlgitbridge.bridge;
import org.eclipse.jgit.lib.Repository;
/**
* Created by Winston on 05/11/14.
*/
public class BridgedProject {
private final Repository repository;
public BridgedProject(Repository repository) {
this.repository = repository;
}
}
@@ -16,5 +16,5 @@ public class DummySnapshotAPI implements SnapshotAPI {
public void putSnapshots(List<Snapshot> snapshots) {
}
}
@@ -32,6 +32,7 @@ public class SnapshotRepositoryBuilder implements RepositoryBuilder {
}
private void buildRepositoryFromScratch(Repository repository) throws RepositoryNotFoundException {
System.out.println("Need to build repo: " + repository.getDirectory().getAbsolutePath());
if (!snapshotDBAPI.repositoryExists(repository)) {
throw new RepositoryNotFoundException(repository.getDirectory());
}