Example #1
0
        public virtual void Test023_createCommitNonAnullii()
        {
            ObjectId emptyId         = InsertEmptyBlob();
            Tree     almostEmptyTree = new Tree(db);

            almostEmptyTree.AddEntry(new FileTreeEntry(almostEmptyTree, emptyId, Sharpen.Runtime.GetBytesForString
                                                           ("empty"), false));
            ObjectId almostEmptyTreeId = InsertTree(almostEmptyTree);

            NGit.CommitBuilder commit = new NGit.CommitBuilder();
            commit.TreeId = almostEmptyTreeId;
            commit.Author = new PersonIdent("Joe H\u00e4cker", "*****@*****.**", 4294967295000L
                                            , 60);
            commit.Committer = new PersonIdent("Joe Hacker", "*****@*****.**", 4294967295000L
                                               , 60);
            commit.SetEncoding("UTF-8");
            commit.Message = "\u00dcbergeeks";
            ObjectId cid = InsertCommit(commit);

            NUnit.Framework.Assert.AreEqual("4680908112778718f37e686cbebcc912730b3154", cid.Name
                                            );
            RevCommit loadedCommit = ParseCommit(cid);

            NUnit.Framework.Assert.AreEqual(commit.Message, loadedCommit.GetFullMessage());
        }
Example #2
0
        public virtual void Test024_createCommitNonAscii()
        {
            ObjectId emptyId         = InsertEmptyBlob();
            Tree     almostEmptyTree = new Tree(db);

            almostEmptyTree.AddEntry(new FileTreeEntry(almostEmptyTree, emptyId, Sharpen.Runtime.GetBytesForString
                                                           ("empty"), false));
            ObjectId almostEmptyTreeId = InsertTree(almostEmptyTree);

            NGit.CommitBuilder commit = new NGit.CommitBuilder();
            commit.TreeId = almostEmptyTreeId;
            commit.Author = new PersonIdent("Joe H\u00e4cker", "*****@*****.**", 4294967295000L
                                            , 60);
            commit.Committer = new PersonIdent("Joe Hacker", "*****@*****.**", 4294967295000L
                                               , 60);
            commit.SetEncoding("ISO-8859-1");
            commit.Message = "\u00dcbergeeks";
            ObjectId cid = InsertCommit(commit);

            NUnit.Framework.Assert.AreEqual("2979b39d385014b33287054b87f77bcb3ecb5ebf", cid.Name
                                            );
        }
Example #3
0
 public virtual void Test024_createCommitNonAscii()
 {
     ObjectId emptyId = InsertEmptyBlob();
     Tree almostEmptyTree = new Tree(db);
     almostEmptyTree.AddEntry(new FileTreeEntry(almostEmptyTree, emptyId, Sharpen.Runtime.GetBytesForString
         ("empty"), false));
     ObjectId almostEmptyTreeId = InsertTree(almostEmptyTree);
     NGit.CommitBuilder commit = new NGit.CommitBuilder();
     commit.TreeId = almostEmptyTreeId;
     commit.Author = new PersonIdent("Joe H\u00e4cker", "*****@*****.**", 4294967295000L
         , 60);
     commit.Committer = new PersonIdent("Joe Hacker", "*****@*****.**", 4294967295000L
         , 60);
     commit.SetEncoding("ISO-8859-1");
     commit.Message = "\u00dcbergeeks";
     ObjectId cid = InsertCommit(commit);
     NUnit.Framework.Assert.AreEqual("2979b39d385014b33287054b87f77bcb3ecb5ebf", cid.Name
         );
 }
Example #4
0
 public virtual void Test023_createCommitNonAnullii()
 {
     ObjectId emptyId = InsertEmptyBlob();
     Tree almostEmptyTree = new Tree(db);
     almostEmptyTree.AddEntry(new FileTreeEntry(almostEmptyTree, emptyId, Sharpen.Runtime.GetBytesForString
         ("empty"), false));
     ObjectId almostEmptyTreeId = InsertTree(almostEmptyTree);
     NGit.CommitBuilder commit = new NGit.CommitBuilder();
     commit.TreeId = almostEmptyTreeId;
     commit.Author = new PersonIdent("Joe H\u00e4cker", "*****@*****.**", 4294967295000L
         , 60);
     commit.Committer = new PersonIdent("Joe Hacker", "*****@*****.**", 4294967295000L
         , 60);
     commit.SetEncoding("UTF-8");
     commit.Message = "\u00dcbergeeks";
     ObjectId cid = InsertCommit(commit);
     NUnit.Framework.Assert.AreEqual("4680908112778718f37e686cbebcc912730b3154", cid.Name
         );
     RevCommit loadedCommit = ParseCommit(cid);
     NUnit.Framework.Assert.AreEqual(commit.Message, loadedCommit.GetFullMessage());
 }