Exemple #1
0
 public void IsKebabCase_ShouldReturnTrue_WhenInputIsValid(string test)
 {
     ConventionRegex.IsKebabCase(test)
     .Should()
     .BeTrue();
 }
Exemple #2
0
 public void IsKebabCase_ShoulRejectNumbers_WhenAllowNumbersIsFalse(string test)
 {
     ConventionRegex.IsKebabCase(test, allowNumbers: false, maxLength: 30)
     .Should()
     .BeFalse();
 }
Exemple #3
0
 public void IsKebabCase_ShoulRejectInputs_WhenInWrongFormat(string test)
 {
     ConventionRegex.IsKebabCase(test)
     .Should()
     .BeFalse();
 }
Exemple #4
0
 public void IsKebabCase_ShoulRejectShortInputs_WhenNotMatchingMinLength(string test)
 {
     ConventionRegex.IsKebabCase(test, minLength: 15, maxLength: 30)
     .Should()
     .BeFalse();
 }
Exemple #5
0
 public void IsKebabCase_ShoulAcceptLongInputs_WhenMaxIsChanged(string test)
 {
     ConventionRegex.IsKebabCase(test, maxLength: 37)
     .Should()
     .BeTrue();
 }
Exemple #6
0
 public void IsKebabCase_ShoulAcceptCapitalLetters_WhenEnumBothIsUsed(string test)
 {
     ConventionRegex.IsKebabCase(test, allowedLetters: RegexLetterCase.Both)
     .Should()
     .BeTrue();
 }