コード例 #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();
 }