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