Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java
index 81ffab9148..1c1cb0fcbc 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java
@@ -43,13 +43,22 @@
package org.eclipse.jgit.dircache;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
import java.io.File;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.RepositoryTestCase;
+import org.junit.Test;
public class DirCacheBuilderTest extends RepositoryTestCase {
+ @Test
public void testBuildEmpty() throws Exception {
{
final DirCache dc = db.lockDirCache();
@@ -65,6 +74,7 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
}
}
+ @Test
public void testBuildRejectsUnsetFileMode() throws Exception {
final DirCache dc = DirCache.newInCore();
final DirCacheBuilder b = dc.builder();
@@ -79,6 +89,7 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
}
}
+ @Test
public void testBuildOneFile_FinishWriteCommit() throws Exception {
final String path = "a-file-path";
final FileMode mode = FileMode.REGULAR_FILE;
@@ -128,6 +139,7 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
}
}
+ @Test
public void testBuildOneFile_Commit() throws Exception {
final String path = "a-file-path";
final FileMode mode = FileMode.REGULAR_FILE;
@@ -175,6 +187,7 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
}
}
+ @Test
public void testFindSingleFile() throws Exception {
final String path = "a-file-path";
final DirCache dc = db.readDirCache();
@@ -201,6 +214,7 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
assertSame(entOrig, dc.getEntry(path));
}
+ @Test
public void testAdd_InGitSortOrder() throws Exception {
final DirCache dc = db.readDirCache();
@@ -225,6 +239,7 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
}
}
+ @Test
public void testAdd_ReverseGitSortOrder() throws Exception {
final DirCache dc = db.readDirCache();
@@ -249,6 +264,7 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
}
}
+ @Test
public void testBuilderClear() throws Exception {
final DirCache dc = db.readDirCache();

Back to the top