summaryrefslogtreecommitdiffstats
path: root/tests/com
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-05-27 23:37:24 -0400
committerJames Moger <james.moger@gitblit.com>2011-05-27 23:37:24 -0400
commit1f9daef870a8c7a984955166a542628d69012ed5 (patch)
tree93972413a5affb9ae3096c7c15ae7b411b08b1ff /tests/com
parent17c417dad5c7be28df4b6e1fd25ec56b484faaff (diff)
downloadgitblit-1f9daef870a8c7a984955166a542628d69012ed5.tar.gz
gitblit-1f9daef870a8c7a984955166a542628d69012ed5.zip
Codepro analyze dependencies. Documentation.
Diffstat (limited to 'tests/com')
-rw-r--r--tests/com/gitblit/tests/GitBlitSuite.java2
-rw-r--r--tests/com/gitblit/tests/JGitUtilsTest.java9
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/com/gitblit/tests/GitBlitSuite.java b/tests/com/gitblit/tests/GitBlitSuite.java
index eaa028d7..a31b0131 100644
--- a/tests/com/gitblit/tests/GitBlitSuite.java
+++ b/tests/com/gitblit/tests/GitBlitSuite.java
@@ -23,7 +23,7 @@ public class GitBlitSuite extends TestSetup {
suite.addTestSuite(JGitUtilsTest.class);
return new GitBlitSuite(suite);
}
-
+
public static Repository getHelloworldRepository() throws Exception {
return new FileRepository(new File(REPOSITORIES, "helloworld.git"));
}
diff --git a/tests/com/gitblit/tests/JGitUtilsTest.java b/tests/com/gitblit/tests/JGitUtilsTest.java
index 0432d39d..7fcf48d7 100644
--- a/tests/com/gitblit/tests/JGitUtilsTest.java
+++ b/tests/com/gitblit/tests/JGitUtilsTest.java
@@ -29,11 +29,12 @@ import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevTree;
+import com.gitblit.models.PathModel.PathChangeModel;
+import com.gitblit.models.RefModel;
+import com.gitblit.models.TicketModel;
+import com.gitblit.utils.DiffUtils;
import com.gitblit.utils.JGitUtils;
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;
public class JGitUtilsTest extends TestCase {
@@ -100,7 +101,7 @@ public class JGitUtilsTest extends TestCase {
Repository repository = GitBlitSuite.getHelloworldRepository();
RevCommit commit = JGitUtils.getCommit(repository,
"1d0c2933a4ae69c362f76797d42d6bd182d05176");
- String diff = JGitUtils.getCommitDiff(repository, commit, DiffOutputType.PLAIN);
+ String diff = DiffUtils.getCommitDiff(repository, commit, DiffOutputType.PLAIN);
repository.close();
assertTrue("Failed to generate diff!", diff != null && diff.length() > 0);
String expected = "- system.out.println(\"Hello World\");\n+ System.out.println(\"Hello World\"";