コード例 #1
0
 public void CommitCmd()
 {
     Assert.AreEqual(
         "commit -F \"COMMITMESSAGE\"",
         _gitModule.CommitCmd(amend: false));
     Assert.AreEqual(
         "commit --amend -F \"COMMITMESSAGE\"",
         _gitModule.CommitCmd(amend: true));
     Assert.AreEqual(
         "commit --signoff -F \"COMMITMESSAGE\"",
         _gitModule.CommitCmd(amend: false, signOff: true));
     Assert.AreEqual(
         "commit --author=\"foo\" -F \"COMMITMESSAGE\"",
         _gitModule.CommitCmd(amend: false, author: "foo"));
     Assert.AreEqual(
         "commit",
         _gitModule.CommitCmd(amend: false, useExplicitCommitMessage: false));
     Assert.AreEqual(
         "commit --no-verify -F \"COMMITMESSAGE\"",
         _gitModule.CommitCmd(amend: false, noVerify: true));
     Assert.AreEqual(
         "commit -S -F \"COMMITMESSAGE\"",
         _gitModule.CommitCmd(amend: false, gpgSign: true));
     Assert.AreEqual(
         "commit -Skey -F \"COMMITMESSAGE\"",
         _gitModule.CommitCmd(amend: false, gpgSign: true, gpgKeyId: "key"));
 }
コード例 #2
0
        public void CommitCmdShouldTrimAuthor(string input, string expected)
        {
            var actual = _gitModule.CommitCmd(false, author: input);

            StringAssert.AreEqualIgnoringCase(expected, actual);
        }