diff options
Diffstat (limited to 'tests/com')
-rw-r--r-- | tests/com/gitblit/tests/GitBlitSuite.java | 2 | ||||
-rw-r--r-- | tests/com/gitblit/tests/JGitUtilsTest.java | 9 |
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\"";
|