Skip to content

Commit e19feb2

Browse files
idodeclareVladimir Kotal
authored andcommitted
Tweak tests for nit
1 parent 8f465e2 commit e19feb2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/history/RepositoryFactoryTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ public void testNormallyEnabledMercurialRepository() throws IllegalAccessExcepti
105105

106106
File root = new File(repository.getSourceRoot(), "mercurial");
107107
env.setSourceRoot(root.getAbsolutePath());
108-
assertNotNull("should get MercurialRepository",
108+
assertNotNull("should get repository for mercurial/",
109109
RepositoryFactory.getRepository(root));
110+
111+
List<Class<? extends Repository>> clazzes = RepositoryFactory.getRepositoryClasses();
112+
assertTrue("should contain MercurialRepository",
113+
clazzes.contains(MercurialRepository.class));
110114
}
111115

112116
@ConditionalRun(RepositoryInstalled.MercurialInstalled.class)
@@ -120,7 +124,7 @@ public void testMercurialRepositoryWhenDisabled() throws IllegalAccessException,
120124

121125
File root = new File(repository.getSourceRoot(), "mercurial");
122126
env.setSourceRoot(root.getAbsolutePath());
123-
assertNull("should not get MercurialRepository if disabled",
127+
assertNull("should not get repository for mercurial/ if disabled",
124128
RepositoryFactory.getRepository(root));
125129

126130
List<Class<? extends Repository>> clazzes = RepositoryFactory.getRepositoryClasses();

0 commit comments

Comments
 (0)