コード例 #1
0
 public void Get_ReturnsCommitMessage_ForEveryValidScenario()
 {
     foreach (var commitType in (GitCommitType[])Enum.GetValues(typeof(GitCommitType)))
     {
         var result = GitCommitMessage.Get(commitType);
         result.Should().NotBeNullOrEmpty();
     }
 }
コード例 #2
0
        protected void Commit(GitCommitType commitType)
        {
#if !DEBUG
            try
            {
                ValidateGitRepo();
                var message = GitCommitMessage.Get(commitType);
                CommitCore(message);
            }
            catch (TypeInitializationException e) when(e.InnerException is DllNotFoundException)
            {
                if (!_beenWarned)
                {
                    WriteWarning(MissingGitBinaryWarning);
                    _beenWarned = true;
                }
            }
#endif
        }