]> source.dussan.org Git - jgit.git/commitdiff
TestRepository: Expose some getters for CommitBuilder 29/43729/5
authorDave Borowitz <dborowitz@google.com>
Thu, 12 Mar 2015 00:14:33 +0000 (17:14 -0700)
committerDave Borowitz <dborowitz@google.com>
Thu, 12 Mar 2015 19:46:26 +0000 (12:46 -0700)
Change-Id: Ic6d179bd2de0081633c22fb82ca68ea619cb686f

org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java

index 6abd34d6f1cf4d02a5650b9956923fe441aa7ff5..a299d144d4c681d95ee47eeff68fe96eedfb93a1 100644 (file)
@@ -915,6 +915,10 @@ public class TestRepository<R extends Repository> {
                        return this;
                }
 
+               public List<RevCommit> parents() {
+                       return Collections.unmodifiableList(parents);
+               }
+
                public CommitBuilder noParents() {
                        parents.clear();
                        return this;
@@ -965,6 +969,10 @@ public class TestRepository<R extends Repository> {
                        return this;
                }
 
+               public String message() {
+                       return message;
+               }
+
                public CommitBuilder tick(int secs) {
                        tick = secs;
                        return this;
@@ -981,11 +989,19 @@ public class TestRepository<R extends Repository> {
                        return this;
                }
 
+               public PersonIdent author() {
+                       return author;
+               }
+
                public CommitBuilder committer(PersonIdent c) {
                        committer = c;
                        return this;
                }
 
+               public PersonIdent committer() {
+                       return committer;
+               }
+
                public CommitBuilder insertChangeId() {
                        insertChangeId = true;
                        return this;