aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2010-12-31 11:44:54 +0100
committerShawn O. Pearce <spearce@spearce.org>2010-12-31 14:00:05 -0800
commitd9e07a574a946693e491668e0d94619bc5d886a5 (patch)
tree5bce4e9d47090d6b427986de4db30be17cc99c6d /org.eclipse.jgit.test/tst/org/eclipse/jgit/patch
parent7cf8b8812f7baa1636c138113f4ed015eed8cc31 (diff)
downloadjgit-d9e07a574a946693e491668e0d94619bc5d886a5.tar.gz
jgit-d9e07a574a946693e491668e0d94619bc5d886a5.zip
Convert all JGit unit tests to JUnit 4
Eclipse has some problem re-running single JUnit tests if the tests are in Junit 3 format, but the JUnit 4 launcher is used. This was quite unnecessary and the move was not completed. We still have no JUnit4 test. This completes the extermination of JUnit3. Most of the work was global searce/replace using regular expression, followed by numerous invocarions of quick-fix and organize imports and verification that we had the same number of tests before and after. - Annotations were introduced. - All references to JUnit3 classes removed - Half-good replacement for getting the test name. This was needed to make the TestRngs work. The initialization of TestRngs was also made lazily since we can not longer find out the test name in runtime in the @Before methods. - Renamed test classes to end with Test, with the exception of TestTranslateBundle, which fails from Maven - Moved JGitTestUtil to the junit support bundle Change-Id: Iddcd3da6ca927a7be773a9c63ebf8bb2147e2d13 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/patch')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java11
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java31
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java17
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java14
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcTest.java16
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchErrorTest.java19
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchTest.java23
7 files changed, 107 insertions, 24 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java
index c265bc097b..61bd8cf9c2 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java
@@ -43,15 +43,18 @@
package org.eclipse.jgit.patch;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
import java.io.IOException;
import java.io.InputStream;
-import junit.framework.TestCase;
-
import org.eclipse.jgit.diff.Edit;
import org.eclipse.jgit.diff.EditList;
+import org.junit.Test;
-public class EditListTest extends TestCase {
+public class EditListTest {
+ @Test
public void testHunkHeader() throws IOException {
final Patch p = parseTestPatchFile("testGetText_BothISO88591.patch");
final FileHeader fh = p.getFiles().get(0);
@@ -65,6 +68,7 @@ public class EditListTest extends TestCase {
assertEquals(new Edit(16 - 1, 17 - 1, 16 - 1, 17 - 1), list1.get(0));
}
+ @Test
public void testFileHeader() throws IOException {
final Patch p = parseTestPatchFile("testGetText_BothISO88591.patch");
final FileHeader fh = p.getFiles().get(0);
@@ -74,6 +78,7 @@ public class EditListTest extends TestCase {
assertEquals(new Edit(16 - 1, 17 - 1, 16 - 1, 17 - 1), e.get(1));
}
+ @Test
public void testTypes() throws IOException {
final Patch p = parseTestPatchFile("testEditList_Types.patch");
final FileHeader fh = p.getFiles().get(0);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java
index 813a701eaf..7b4e014449 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java
@@ -43,14 +43,21 @@
package org.eclipse.jgit.patch;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
+import org.junit.Test;
-public class FileHeaderTest extends TestCase {
+public class FileHeaderTest {
+ @Test
public void testParseGitFileName_Empty() {
final FileHeader fh = data("");
assertEquals(-1, fh.parseGitFileName(0, fh.buf.length));
@@ -59,21 +66,25 @@ public class FileHeaderTest extends TestCase {
assertFalse(fh.hasMetaDataChanges());
}
+ @Test
public void testParseGitFileName_NoLF() {
final FileHeader fh = data("a/ b/");
assertEquals(-1, fh.parseGitFileName(0, fh.buf.length));
}
+ @Test
public void testParseGitFileName_NoSecondLine() {
final FileHeader fh = data("\n");
assertEquals(-1, fh.parseGitFileName(0, fh.buf.length));
}
+ @Test
public void testParseGitFileName_EmptyHeader() {
final FileHeader fh = data("\n\n");
assertEquals(1, fh.parseGitFileName(0, fh.buf.length));
}
+ @Test
public void testParseGitFileName_Foo() {
final String name = "foo";
final FileHeader fh = header(name);
@@ -84,6 +95,7 @@ public class FileHeaderTest extends TestCase {
assertFalse(fh.hasMetaDataChanges());
}
+ @Test
public void testParseGitFileName_FailFooBar() {
final FileHeader fh = data("a/foo b/bar\n-");
assertTrue(fh.parseGitFileName(0, fh.buf.length) > 0);
@@ -92,6 +104,7 @@ public class FileHeaderTest extends TestCase {
assertFalse(fh.hasMetaDataChanges());
}
+ @Test
public void testParseGitFileName_FooSpBar() {
final String name = "foo bar";
final FileHeader fh = header(name);
@@ -102,6 +115,7 @@ public class FileHeaderTest extends TestCase {
assertFalse(fh.hasMetaDataChanges());
}
+ @Test
public void testParseGitFileName_DqFooTabBar() {
final String name = "foo\tbar";
final String dqName = "foo\\tbar";
@@ -113,6 +127,7 @@ public class FileHeaderTest extends TestCase {
assertFalse(fh.hasMetaDataChanges());
}
+ @Test
public void testParseGitFileName_DqFooSpLfNulBar() {
final String name = "foo \n\0bar";
final String dqName = "foo \\n\\0bar";
@@ -124,6 +139,7 @@ public class FileHeaderTest extends TestCase {
assertFalse(fh.hasMetaDataChanges());
}
+ @Test
public void testParseGitFileName_SrcFooC() {
final String name = "src/foo/bar/argh/code.c";
final FileHeader fh = header(name);
@@ -134,6 +150,7 @@ public class FileHeaderTest extends TestCase {
assertFalse(fh.hasMetaDataChanges());
}
+ @Test
public void testParseGitFileName_SrcFooCNonStandardPrefix() {
final String name = "src/foo/bar/argh/code.c";
final String header = "project-v-1.0/" + name + " mydev/" + name + "\n";
@@ -144,6 +161,7 @@ public class FileHeaderTest extends TestCase {
assertFalse(fh.hasMetaDataChanges());
}
+ @Test
public void testParseUnicodeName_NewFile() {
final FileHeader fh = data("diff --git \"a/\\303\\205ngstr\\303\\266m\" \"b/\\303\\205ngstr\\303\\266m\"\n"
+ "new file mode 100644\n"
@@ -169,6 +187,7 @@ public class FileHeaderTest extends TestCase {
assertEquals(0, fh.getScore());
}
+ @Test
public void testParseUnicodeName_DeleteFile() {
final FileHeader fh = data("diff --git \"a/\\303\\205ngstr\\303\\266m\" \"b/\\303\\205ngstr\\303\\266m\"\n"
+ "deleted file mode 100644\n"
@@ -194,6 +213,7 @@ public class FileHeaderTest extends TestCase {
assertEquals(0, fh.getScore());
}
+ @Test
public void testParseModeChange() {
final FileHeader fh = data("diff --git a/a b b/a b\n"
+ "old mode 100644\n" + "new mode 100755\n");
@@ -213,6 +233,7 @@ public class FileHeaderTest extends TestCase {
assertEquals(0, fh.getScore());
}
+ @Test
public void testParseRename100_NewStyle() {
final FileHeader fh = data("diff --git a/a b/ c/\\303\\205ngstr\\303\\266m\n"
+ "similarity index 100%\n"
@@ -242,6 +263,7 @@ public class FileHeaderTest extends TestCase {
assertEquals(100, fh.getScore());
}
+ @Test
public void testParseRename100_OldStyle() {
final FileHeader fh = data("diff --git a/a b/ c/\\303\\205ngstr\\303\\266m\n"
+ "similarity index 100%\n"
@@ -271,6 +293,7 @@ public class FileHeaderTest extends TestCase {
assertEquals(100, fh.getScore());
}
+ @Test
public void testParseCopy100() {
final FileHeader fh = data("diff --git a/a b/ c/\\303\\205ngstr\\303\\266m\n"
+ "similarity index 100%\n"
@@ -300,6 +323,7 @@ public class FileHeaderTest extends TestCase {
assertEquals(100, fh.getScore());
}
+ @Test
public void testParseFullIndexLine_WithMode() {
final String oid = "78981922613b2afb6025042ff6bd878ac1994e85";
final String nid = "61780798228d17af2d34fce4cfbdf35556832472";
@@ -324,6 +348,7 @@ public class FileHeaderTest extends TestCase {
assertEquals(ObjectId.fromString(nid), fh.getNewId().toObjectId());
}
+ @Test
public void testParseFullIndexLine_NoMode() {
final String oid = "78981922613b2afb6025042ff6bd878ac1994e85";
final String nid = "61780798228d17af2d34fce4cfbdf35556832472";
@@ -348,6 +373,7 @@ public class FileHeaderTest extends TestCase {
assertEquals(ObjectId.fromString(nid), fh.getNewId().toObjectId());
}
+ @Test
public void testParseAbbrIndexLine_WithMode() {
final int a = 7;
final String oid = "78981922613b2afb6025042ff6bd878ac1994e85";
@@ -377,6 +403,7 @@ public class FileHeaderTest extends TestCase {
assertTrue(ObjectId.fromString(nid).startsWith(fh.getNewId()));
}
+ @Test
public void testParseAbbrIndexLine_NoMode() {
final int a = 7;
final String oid = "78981922613b2afb6025042ff6bd878ac1994e85";
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java
index 8d06987fde..2aaf6afbe3 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java
@@ -43,14 +43,20 @@
package org.eclipse.jgit.patch;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
-import junit.framework.TestCase;
+import org.eclipse.jgit.junit.JGitTestUtil;
+import org.junit.Test;
-public class GetTextTest extends TestCase {
+public class GetTextTest {
+ @Test
public void testGetText_BothISO88591() throws IOException {
final Charset cs = Charset.forName("ISO-8859-1");
final Patch p = parseTestPatchFile();
@@ -61,6 +67,7 @@ public class GetTextTest extends TestCase {
assertEquals(readTestPatchFile(cs), fh.getScriptText(cs, cs));
}
+ @Test
public void testGetText_NoBinary() throws IOException {
final Charset cs = Charset.forName("ISO-8859-1");
final Patch p = parseTestPatchFile();
@@ -71,6 +78,7 @@ public class GetTextTest extends TestCase {
assertEquals(readTestPatchFile(cs), fh.getScriptText(cs, cs));
}
+ @Test
public void testGetText_Convert() throws IOException {
final Charset csOld = Charset.forName("ISO-8859-1");
final Charset csNew = Charset.forName("UTF-8");
@@ -90,6 +98,7 @@ public class GetTextTest extends TestCase {
assertEquals(exp, fh.getScriptText(csOld, csNew));
}
+ @Test
public void testGetText_DiffCc() throws IOException {
final Charset csOld = Charset.forName("ISO-8859-1");
final Charset csNew = Charset.forName("UTF-8");
@@ -111,7 +120,7 @@ public class GetTextTest extends TestCase {
}
private Patch parseTestPatchFile() throws IOException {
- final String patchFile = getName() + ".patch";
+ final String patchFile = JGitTestUtil.getName() + ".patch";
final InputStream in = getClass().getResourceAsStream(patchFile);
if (in == null) {
fail("No " + patchFile + " test vector");
@@ -127,7 +136,7 @@ public class GetTextTest extends TestCase {
}
private String readTestPatchFile(final Charset cs) throws IOException {
- final String patchFile = getName() + ".patch";
+ final String patchFile = JGitTestUtil.getName() + ".patch";
final InputStream in = getClass().getResourceAsStream(patchFile);
if (in == null) {
fail("No " + patchFile + " test vector");
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java
index 87bd9d386d..1f9d5335fe 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java
@@ -43,15 +43,21 @@
package org.eclipse.jgit.patch;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
import org.eclipse.jgit.JGitText;
+import org.eclipse.jgit.junit.JGitTestUtil;
+import org.junit.Test;
-import junit.framework.TestCase;
-
-public class PatchCcErrorTest extends TestCase {
+public class PatchCcErrorTest {
+ @Test
public void testError_CcTruncatedOld() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -88,7 +94,7 @@ public class PatchCcErrorTest extends TestCase {
}
private Patch parseTestPatchFile() throws IOException {
- final String patchFile = getName() + ".patch";
+ final String patchFile = JGitTestUtil.getName() + ".patch";
final InputStream in = getClass().getResourceAsStream(patchFile);
if (in == null) {
fail("No " + patchFile + " test vector");
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcTest.java
index cef13f5f16..837414b054 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcTest.java
@@ -43,15 +43,21 @@
package org.eclipse.jgit.patch;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.IOException;
import java.io.InputStream;
-import junit.framework.TestCase;
-
import org.eclipse.jgit.diff.DiffEntry;
+import org.eclipse.jgit.junit.JGitTestUtil;
import org.eclipse.jgit.lib.FileMode;
+import org.junit.Test;
-public class PatchCcTest extends TestCase {
+public class PatchCcTest {
+ @Test
public void testParse_OneFileCc() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -107,6 +113,7 @@ public class PatchCcTest extends TestCase {
}
}
+ @Test
public void testParse_CcNewFile() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -161,6 +168,7 @@ public class PatchCcTest extends TestCase {
}
}
+ @Test
public void testParse_CcDeleteFile() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -190,7 +198,7 @@ public class PatchCcTest extends TestCase {
}
private Patch parseTestPatchFile() throws IOException {
- final String patchFile = getName() + ".patch";
+ final String patchFile = JGitTestUtil.getName() + ".patch";
final InputStream in = getClass().getResourceAsStream(patchFile);
if (in == null) {
fail("No " + patchFile + " test vector");
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchErrorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchErrorTest.java
index 67b3f5c589..52e3874b6c 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchErrorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchErrorTest.java
@@ -43,12 +43,20 @@
package org.eclipse.jgit.patch;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.IOException;
import java.io.InputStream;
-import junit.framework.TestCase;
+import org.eclipse.jgit.junit.JGitTestUtil;
+import org.junit.Test;
-public class PatchErrorTest extends TestCase {
+public class PatchErrorTest {
+ @Test
public void testError_DisconnectedHunk() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -68,6 +76,7 @@ public class PatchErrorTest extends TestCase {
assertTrue(e.getLineText().startsWith("@@ -109,4 +109,11 @@ assert"));
}
+ @Test
public void testError_TruncatedOld() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -81,6 +90,7 @@ public class PatchErrorTest extends TestCase {
assertTrue(e.getLineText().startsWith("@@ -236,9 +236,9 @@ protected "));
}
+ @Test
public void testError_TruncatedNew() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -94,6 +104,7 @@ public class PatchErrorTest extends TestCase {
assertTrue(e.getLineText().startsWith("@@ -236,9 +236,9 @@ protected "));
}
+ @Test
public void testError_BodyTooLong() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -107,6 +118,7 @@ public class PatchErrorTest extends TestCase {
assertTrue(e.getLineText().startsWith("@@ -109,4 +109,11 @@ assert"));
}
+ @Test
public void testError_GarbageBetweenFiles() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(2, p.getFiles().size());
@@ -133,6 +145,7 @@ public class PatchErrorTest extends TestCase {
assertEquals("I AM NOT HERE\n", e.getLineText());
}
+ @Test
public void testError_GitBinaryNoForwardHunk() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(2, p.getFiles().size());
@@ -163,7 +176,7 @@ public class PatchErrorTest extends TestCase {
}
private Patch parseTestPatchFile() throws IOException {
- final String patchFile = getName() + ".patch";
+ final String patchFile = JGitTestUtil.getName() + ".patch";
final InputStream in = getClass().getResourceAsStream(patchFile);
if (in == null) {
fail("No " + patchFile + " test vector");
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchTest.java
index dd76251385..9f57ab98c0 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchTest.java
@@ -43,21 +43,31 @@
package org.eclipse.jgit.patch;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.IOException;
import java.io.InputStream;
-import junit.framework.TestCase;
-
+import org.eclipse.jgit.junit.JGitTestUtil;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
+import org.junit.Test;
-public class PatchTest extends TestCase {
+public class PatchTest {
+ @Test
public void testEmpty() {
final Patch p = new Patch();
assertTrue(p.getFiles().isEmpty());
assertTrue(p.getErrors().isEmpty());
}
+ @Test
public void testParse_ConfigCaseInsensitive() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(2, p.getFiles().size());
@@ -155,6 +165,7 @@ public class PatchTest extends TestCase {
}
}
+ @Test
public void testParse_NoBinary() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(5, p.getFiles().size());
@@ -190,6 +201,7 @@ public class PatchTest extends TestCase {
assertEquals(272, fh.getHunks().get(0).getOldImage().getStartLine());
}
+ @Test
public void testParse_GitBinaryLiteral() throws IOException {
final Patch p = parseTestPatchFile();
final int[] binsizes = { 359, 393, 372, 404 };
@@ -235,6 +247,7 @@ public class PatchTest extends TestCase {
assertEquals(272, fh.getHunks().get(0).getOldImage().getStartLine());
}
+ @Test
public void testParse_GitBinaryDelta() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -272,6 +285,7 @@ public class PatchTest extends TestCase {
assertEquals(496, fh.endOffset);
}
+ @Test
public void testParse_FixNoNewline() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -306,6 +320,7 @@ public class PatchTest extends TestCase {
}
}
+ @Test
public void testParse_AddNoNewline() throws IOException {
final Patch p = parseTestPatchFile();
assertEquals(1, p.getFiles().size());
@@ -341,7 +356,7 @@ public class PatchTest extends TestCase {
}
private Patch parseTestPatchFile() throws IOException {
- final String patchFile = getName() + ".patch";
+ final String patchFile = JGitTestUtil.getName() + ".patch";
final InputStream in = getClass().getResourceAsStream(patchFile);
if (in == null) {
fail("No " + patchFile + " test vector");