@@ -53,18 +53,28 @@ public static void tearDown() {
53
53
}
54
54
55
55
/*
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
57
57
* this test is not supposed to have working Mercurial anyway.
58
58
*/
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 {
62
61
63
- String propName = MercurialRepository .CMD_PROPERTY_KEY ;
64
62
String origPropValue = System .setProperty (propName , "/foo/bar/nonexistent" );
65
- File root = new File (repository .getSourceRoot (), "mercurial" );
63
+ File root = new File (repository .getSourceRoot (), repoPath );
66
64
Repository repo = RepositoryFactory .getRepository (root );
67
65
System .setProperty (propName , origPropValue );
68
66
assertFalse (repo .isWorking ());
69
67
}
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
+ }
70
80
}
0 commit comments