File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Code/Light.GuardClauses.Tests/StringAssertions Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,16 @@ public static class MustBeFileExtensionTests
1818 "...." ,
1919 ".docx." ,
2020 ] ;
21+
22+ public static readonly TheoryData < string > ValidFileExtensionsData =
23+ [
24+ ".txt" ,
25+ ".jpg" ,
26+ ".tar.gz" ,
27+ ] ;
2128
2229 [ Theory ]
23- [ InlineData ( ".txt" ) ]
24- [ InlineData ( ".jpg" ) ]
25- [ InlineData ( ".tar.gz" ) ]
30+ [ MemberData ( nameof ( ValidFileExtensionsData ) ) ]
2631 public static void ValidFileExtensions ( string input ) =>
2732 input . MustBeFileExtension ( ) . Should ( ) . BeSameAs ( input ) ;
2833
@@ -77,9 +82,7 @@ public static void CallerArgumentExpression()
7782 }
7883
7984 [ Theory ]
80- [ InlineData ( ".txt" ) ]
81- [ InlineData ( ".jpg" ) ]
82- [ InlineData ( ".tar.gz" ) ]
85+ [ MemberData ( nameof ( ValidFileExtensionsData ) ) ]
8386 public static void ValidFileExtensions_Span ( string input )
8487 {
8588 var span = input . AsSpan ( ) ;
You can’t perform that action at this time.
0 commit comments