From 1e83907b001a2df3f14a35fc36c47ea8f49155c4 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 25 Apr 2011 21:52:38 -0400 Subject: [PATCH] Sprinkled some icons throughout ui. Centralized icon retrieval. --- src/com/gitblit/tests/JGitUtilsTest.java | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/com/gitblit/tests/JGitUtilsTest.java b/src/com/gitblit/tests/JGitUtilsTest.java index b6b497f..196058c 100644 --- a/src/com/gitblit/tests/JGitUtilsTest.java +++ b/src/com/gitblit/tests/JGitUtilsTest.java @@ -15,7 +15,8 @@ import org.eclipse.jgit.storage.file.FileRepository; import com.gitblit.utils.JGitUtils; -import com.gitblit.wicket.models.PathModel; +import com.gitblit.utils.JGitUtils.DiffOutputType; +import com.gitblit.wicket.models.PathModel.PathChangeModel; import com.gitblit.wicket.models.RefModel; import com.gitblit.wicket.models.TicketModel; @@ -50,6 +51,14 @@ r.close(); assertTrue("Could not get last repository change date!", date != null); } + + public void testFirstCommit() throws Exception { + Repository r = getRepository(); + RevCommit commit = JGitUtils.getFirstCommit(r, null); + r.close(); + assertTrue("Could not get first commit!", commit != null); + System.out.println(commit.getName() + " " + commit.getShortMessage()); + } public void testRetrieveRevObject() throws Exception { Repository r = getRepository(); @@ -82,7 +91,7 @@ public void testFilesInCommit() throws Exception { Repository r = getRepository(); RevCommit commit = JGitUtils.getCommit(r, Constants.HEAD); - List<PathModel> paths = JGitUtils.getFilesInCommit(r, commit); + List<PathChangeModel> paths = JGitUtils.getFilesInCommit(r, commit); r.close(); assertTrue("No changed paths found!", paths.size() > 0); } @@ -90,7 +99,7 @@ public void testCommitDiff() throws Exception { Repository r = getRepository(); RevCommit commit = JGitUtils.getCommit(r, Constants.HEAD); - String diff = JGitUtils.getCommitDiff(r, commit, false); + String diff = JGitUtils.getCommitDiff(r, commit, DiffOutputType.PLAIN); r.close(); System.out.println(diff); } -- Gitblit v1.9.1