String contentA = JGitUtils.getStringContent(repository, (RevTree) null, "java.java");\r
RevCommit commit = JGitUtils.getCommit(repository, Constants.HEAD);\r
String contentB = JGitUtils.getStringContent(repository, commit.getTree(), "java.java");\r
+\r
+ assertTrue("ContentA is null!", contentA != null && contentA.length() > 0);\r
+ assertTrue("ContentB is null!", contentB != null && contentB.length() > 0);\r
+ assertTrue(contentA.equals(contentB));\r
+\r
String contentC = JGitUtils.getStringContent(repository, commit.getTree(), "missing.txt");\r
\r
// manually construct a blob, calculate the hash, lookup the hash in git\r
String sha1 = StringUtils.getSHA1(sb.toString());\r
String contentD = JGitUtils.getStringContent(repository, sha1);\r
repository.close();\r
- assertTrue("ContentA is null!", contentA != null && contentA.length() > 0);\r
- assertTrue("ContentB is null!", contentB != null && contentB.length() > 0);\r
- assertTrue(contentA.equals(contentB));\r
assertNull(contentC);\r
assertTrue(contentA.equals(contentD));\r
}\r