summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsInserterTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsInserterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsInserterTest.java
index 11a092468c..74790f72c5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsInserterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsInserterTest.java
@@ -45,6 +45,7 @@ package org.eclipse.jgit.internal.storage.dfs;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
@@ -97,6 +98,7 @@ public class DfsInserterTest {
assertEquals(0, db.getObjectDatabase().listPacks().size());
ObjectReader reader = ins.newReader();
+ assertSame(ins, reader.getCreatedFromInserter());
assertEquals("foo", readString(reader.open(id1)));
assertEquals("bar", readString(reader.open(id2)));
assertEquals(0, db.getObjectDatabase().listPacks().size());
@@ -118,6 +120,7 @@ public class DfsInserterTest {
assertEquals(0, db.getObjectDatabase().listPacks().size());
ObjectReader reader = ins.newReader();
+ assertSame(ins, reader.getCreatedFromInserter());
assertTrue(Arrays.equals(data, readStream(reader.open(id1))));
assertEquals(0, db.getObjectDatabase().listPacks().size());
ins.flush();
@@ -136,6 +139,7 @@ public class DfsInserterTest {
assertEquals(1, db.getObjectDatabase().listPacks().size());
ObjectReader reader = ins.newReader();
+ assertSame(ins, reader.getCreatedFromInserter());
assertEquals("foo", readString(reader.open(id1)));
assertEquals("bar", readString(reader.open(id2)));
assertEquals(1, db.getObjectDatabase().listPacks().size());
@@ -154,6 +158,7 @@ public class DfsInserterTest {
assertFalse(abbr1.equals(abbr2));
ObjectReader reader = ins.newReader();
+ assertSame(ins, reader.getCreatedFromInserter());
Collection<ObjectId> objs;
objs = reader.resolve(AbbreviatedObjectId.fromString(abbr1));
assertEquals(1, objs.size());