@Test public void testRun() throws Exception { Util.untar(PROJ_TAR_FILE, DEST_PATH); HistoryGraph actualHGraph = null; actualHGraph = REPOSITORY_PROJ.buildHistoryGraph(COMMIT_4, COMMIT_1); assertNotNull("constructor returns null on " + PROJ, actualHGraph); assertEquals("result mismatched on " + PROJ, EXPECTED_HGRAPH_PROJ, actualHGraph); FileUtils.deleteDirectory(PROJ_DIR); }
@Test public void testBuildFullHistoryGraph() throws Exception { Util.untar(SAMPLE_REPOSITORIES_TAR_FILE, DEST_PATH); for (int i = 0; i < DIRECTORIES.length; i++) { Repository repo = new GitRepository(DIRECTORIES[i], BUILD_STRATEGIES[i]); HistoryGraph actualHGraph = null; actualHGraph = repo.buildHistoryGraph(START_COMMIT_IDS[i], END_COMMIT_IDS[i]); assertNotNull("constructor returns null on " + DIRECTORIES[i], actualHGraph); assertEquals("result mismatched on " + DIRECTORIES[i], EXPECTED_HGRAPHS[i], actualHGraph); } FileUtils.deleteDirectory(new File(SAMPLE_REPOSITORIES)); }