@Test\r
public void testFilesInPath2() throws Exception {\r
assertEquals(0, JGitUtils.getFilesInPath2(null, null, null).size());\r
+\r
Repository repository = GitBlitSuite.getHelloworldRepository();\r
+\r
List<PathModel> files = JGitUtils.getFilesInPath2(repository, null, null);\r
+ assertEquals(GitBlitSuite.helloworldSettings.getInteger(HelloworldKeys.files.top, 15), files.size());\r
+\r
+ files = JGitUtils.getFilesInPath2(repository, "C", null);\r
+ assertEquals(GitBlitSuite.helloworldSettings.getInteger(HelloworldKeys.files.C.top, 1), files.size());\r
+\r
+ files = JGitUtils.getFilesInPath2(repository, "[C++]", null);\r
+ assertEquals(GitBlitSuite.helloworldSettings.getInteger(HelloworldKeys.files.Cpp, 1), files.size());\r
+\r
+ files = JGitUtils.getFilesInPath2(repository, "C/C (K&R)", null);\r
+ assertEquals(GitBlitSuite.helloworldSettings.getInteger(HelloworldKeys.files.C.KnR, 1), files.size());\r
+\r
repository.close();\r
- assertTrue(files.size() > 10);\r
}\r
\r
@Test\r