Пример #1
0
 public void IsKebabCase_ShoulRejectNumbers_WhenAllowNumbersIsFalse(string test)
 {
     ConventionRegex.IsKebabCase(test, allowNumbers: false, maxLength: 30)
     .Should()
     .BeFalse();
 }
Пример #2
0
 public void IsSnakeCase_ShoulRejectNumbers_WhenAllowNumbersIsFalse(string test)
 {
     ConventionRegex.IsSnakeCase(test, allowNumbers: false)
     .Should()
     .BeFalse();
 }
Пример #3
0
 public void IsMixedKebabSnakeCase_ShoulRejectDots(string test)
 {
     ConventionRegex.IsSnakeCase(test, allowNumbers: false, maxLength: 30)
     .Should()
     .BeFalse();
 }
Пример #4
0
 public void IsDotNotation_ShoulRejectInput_WhenWrongCase(string test)
 {
     ConventionRegex.IsDotNotation(test)
     .Should()
     .BeFalse();
 }
Пример #5
0
 public void IsDotNotation_ShoulRejectInput_WhenForbiddenCharactersAreUsed(string test)
 {
     ConventionRegex.IsDotNotation(test)
     .Should()
     .BeFalse();
 }
Пример #6
0
 public void IsDotNotation_ShouldTakeCaptialLetters_WhenCaptialEnumIsUsed(string test)
 {
     ConventionRegex.IsDotNotation(test, allowedLetters: RegexLetterCase.CapitalOnly, maxLength: 25)
     .Should()
     .BeTrue();
 }
Пример #7
0
 public void IsDotNotation_ShoulRejectLowerCase_WhenCaptialOnlyIsUsed(string test)
 {
     ConventionRegex.IsDotNotation(test, allowedLetters: RegexLetterCase.CapitalOnly)
     .Should()
     .BeFalse();
 }
Пример #8
0
 public void IsLowerCamelCase_ShoulRejectInputs_WhenInWrongFormat(string test)
 {
     ConventionRegex.IsLowerCamelCase(test, maxLength: 40)
     .Should()
     .BeFalse();
 }
Пример #9
0
 public void IsKebabCase_ShoulRejectInputs_WhenInWrongFormat(string test)
 {
     ConventionRegex.IsKebabCase(test)
     .Should()
     .BeFalse();
 }
Пример #10
0
 public void IsLowerCamelCase_ShoulAcceptLongInputs_WhenMaxIsChanged(string test)
 {
     ConventionRegex.IsLowerCamelCase(test, maxLength: 40)
     .Should()
     .BeTrue();
 }
Пример #11
0
 public void IsUpperCamelCase_ShoulRejectShortInputs_WhenNotMatchingMinLength(string test)
 {
     ConventionRegex.IsUpperCamelCase(test, minLength: 15, maxLength: 30)
     .Should()
     .BeFalse();
 }
Пример #12
0
 public void IsSnakeCase_ShoulAcceptLongInputs_WhenMaxIsChanged(string test)
 {
     ConventionRegex.IsSnakeCase(test, maxLength: 28, allowNumbers: true)
     .Should()
     .BeTrue();
 }
Пример #13
0
 public void IsMixedKebabSnakeCase_ShoulAcceptCapitalLetters_WhenEnumBothIsUsed(string test)
 {
     ConventionRegex.IsMixedKebabSnakeCase(test, allowedLetters: RegexLetterCase.Both)
     .Should()
     .BeTrue();
 }
Пример #14
0
 public void IsDotNotation_ShouldTakeacceptNumbers_WhenOptionIsSet(string test)
 {
     ConventionRegex.IsDotNotation(test, allowNumbers: true)
     .Should()
     .BeTrue();
 }
Пример #15
0
 public void IsUpperCamelCase_ShouldReturnTrue_WhenInputHasDigits(string test)
 {
     ConventionRegex.IsUpperCamelCase(test, allowNumbers: true)
     .Should()
     .BeTrue();
 }
Пример #16
0
 public void IsSnakeCase_ShoulRejectCapitalInputs_WhenNotPermitted(string test)
 {
     ConventionRegex.IsSnakeCase(test, maxLength: 37)
     .Should()
     .BeFalse();
 }
Пример #17
0
 public void IsSnakeCase_ShouldReturnTrue_WhenInputIsValid(string test)
 {
     ConventionRegex.IsSnakeCase(test)
     .Should()
     .BeTrue();
 }
Пример #18
0
 public void IsDotNotation_ShouldReturnTrue_WhenInputIsValid(string test)
 {
     ConventionRegex.IsDotNotation(test, maxLength: 21)
     .Should()
     .BeTrue();
 }