Exemple #1
0
 public GitBranchNameOptions(string replacementToken)
 {
     if (!string.IsNullOrEmpty(replacementToken))
     {
         if (replacementToken.Length > 1)
         {
             throw new ArgumentOutOfRangeException(nameof(replacementToken), "Replacement token must be a single character");
         }
         if (!GitBranchNameNormaliser.IsValidChar(replacementToken[0]))
         {
             throw new ArgumentOutOfRangeException(nameof(replacementToken), string.Format("Replacement token invalid: '{0}'", replacementToken));
         }
     }
     ReplacementToken = replacementToken ?? string.Empty;
 }
 public void Setup()
 {
     _gitBranchNameNormaliser = new GitBranchNameNormaliser();
     _gitBranchNameOptions = new GitBranchNameOptions("_");
 }