aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AlternatesTest.java3
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java3
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java16
3 files changed, 12 insertions, 10 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AlternatesTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AlternatesTest.java
index b09db03ea7..2306e0bbb1 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AlternatesTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AlternatesTest.java
@@ -42,6 +42,7 @@
*/
package org.eclipse.jgit.internal.storage.file;
+import static org.eclipse.jgit.lib.Constants.INFO_ALTERNATES;
import static org.junit.Assert.assertTrue;
import java.io.File;
@@ -76,7 +77,7 @@ public class AlternatesTest extends SampleDataRepositoryTestCase {
private void setAlternate(FileRepository from, FileRepository to)
throws IOException {
File alt = new File(from.getObjectDatabase().getDirectory(),
- "info/alternates");
+ INFO_ALTERNATES);
alt.getParentFile().mkdirs();
File fromDir = from.getObjectDatabase().getDirectory();
File toDir = to.getObjectDatabase().getDirectory();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
index 5d0a7e2a0b..1e2341b6a5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
@@ -44,6 +44,7 @@
package org.eclipse.jgit.internal.storage.file;
import static org.eclipse.jgit.internal.storage.pack.PackWriter.NONE;
+import static org.eclipse.jgit.lib.Constants.INFO_ALTERNATES;
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -138,7 +139,7 @@ public class PackWriterTest extends SampleDataRepositoryTestCase {
config = new PackConfig(db);
dst = createBareRepository();
- File alt = new File(dst.getObjectDatabase().getDirectory(), "info/alternates");
+ File alt = new File(dst.getObjectDatabase().getDirectory(), INFO_ALTERNATES);
alt.getParentFile().mkdirs();
write(alt, db.getObjectDatabase().getDirectory().getAbsolutePath() + "\n");
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
index c6138495fc..825d15b18f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
@@ -96,7 +96,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
public void test001_Initalize() {
final File gitdir = new File(trash, Constants.DOT_GIT);
final File hooks = new File(gitdir, "hooks");
- final File objects = new File(gitdir, "objects");
+ final File objects = new File(gitdir, Constants.OBJECTS);
final File objects_pack = new File(objects, "pack");
final File objects_info = new File(objects, "info");
final File refs = new File(gitdir, "refs");
@@ -148,7 +148,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
assertEqualsPath(theDir, r.getDirectory());
assertEqualsPath(repo1Parent, r.getWorkTree());
assertEqualsPath(new File(theDir, "index"), r.getIndexFile());
- assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase()
+ assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase()
.getDirectory());
}
@@ -174,7 +174,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
assertEqualsPath(theDir, r.getDirectory());
assertEqualsPath(repo1Parent.getParentFile(), r.getWorkTree());
assertEqualsPath(new File(theDir, "index"), r.getIndexFile());
- assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase()
+ assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase()
.getDirectory());
}
@@ -198,7 +198,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
assertEqualsPath(theDir, r.getDirectory());
assertEqualsPath(repo1Parent, r.getWorkTree());
assertEqualsPath(new File(theDir, "index"), r.getIndexFile());
- assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase()
+ assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase()
.getDirectory());
}
@@ -227,7 +227,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
assertEqualsPath(theDir, r.getDirectory());
assertEqualsPath(workdir, r.getWorkTree());
assertEqualsPath(new File(theDir, "index"), r.getIndexFile());
- assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase()
+ assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase()
.getDirectory());
}
@@ -256,7 +256,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
assertEqualsPath(theDir, r.getDirectory());
assertEqualsPath(workdir, r.getWorkTree());
assertEqualsPath(new File(theDir, "index"), r.getIndexFile());
- assertEqualsPath(new File(theDir, "objects"), r.getObjectDatabase()
+ assertEqualsPath(new File(theDir, Constants.OBJECTS), r.getObjectDatabase()
.getDirectory());
}
@@ -312,7 +312,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
}
final File o = new File(new File(new File(newdb.getDirectory(),
- "objects"), "4b"), "825dc642cb6eb9a060e54bf8d69288fbee4904");
+ Constants.OBJECTS), "4b"), "825dc642cb6eb9a060e54bf8d69288fbee4904");
assertTrue("Exists " + o, o.isFile());
assertTrue("Read-only " + o, !o.canWrite());
}
@@ -324,7 +324,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
final ObjectId treeId = insertTree(new TreeFormatter());
assertEquals("4b825dc642cb6eb9a060e54bf8d69288fbee4904", treeId.name());
final File o = new File(new File(
- new File(db.getDirectory(), "objects"), "4b"),
+ new File(db.getDirectory(), Constants.OBJECTS), "4b"),
"825dc642cb6eb9a060e54bf8d69288fbee4904");
assertFalse("Exists " + o, o.isFile());
}