Skip to content

Commit 5fd40f0

Browse files
author
Vladimir Kotal
committed
add bitkeeper
1 parent f202f17 commit 5fd40f0

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

test/org/opensolaris/opengrok/history/RepositoryFactoryTest.java

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,28 @@ public static void tearDown() {
5353
}
5454

5555
/*
56-
* There is no conditonal run based on whether Mercurial is installed because
56+
* There is no conditonal run based on whether given repository is installed because
5757
* this test is not supposed to have working Mercurial anyway.
5858
*/
59-
@Test
60-
public void testNotWorkingRepository() throws InstantiationException, IllegalAccessException,
61-
NoSuchMethodException, InvocationTargetException {
59+
private void testNotWorkingRepository(String repoPath, String propName)
60+
throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
6261

63-
String propName = MercurialRepository.CMD_PROPERTY_KEY;
6462
String origPropValue = System.setProperty(propName, "/foo/bar/nonexistent");
65-
File root = new File(repository.getSourceRoot(), "mercurial");
63+
File root = new File(repository.getSourceRoot(), repoPath);
6664
Repository repo = RepositoryFactory.getRepository(root);
6765
System.setProperty(propName, origPropValue);
6866
assertFalse(repo.isWorking());
6967
}
68+
69+
@Test
70+
public void testNotWorkingMercurialRepository()
71+
throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
72+
testNotWorkingRepository("mercurial", MercurialRepository.CMD_PROPERTY_KEY);
73+
}
74+
75+
@Test
76+
public void testNotWorkingBitkeeperRepository()
77+
throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
78+
testNotWorkingRepository("bitkeeper", BitKeeperRepository.CMD_PROPERTY_KEY);
79+
}
7080
}

0 commit comments

Comments
 (0)