@@ -12,7 +12,7 @@ namespace Microsoft.Framework.FileSystemGlobbing.Tests
12
12
{
13
13
public class FunctionalTests : IDisposable
14
14
{
15
- private DisposableFileSystem _context ;
15
+ private readonly DisposableFileSystem _context ;
16
16
17
17
public FunctionalTests ( )
18
18
{
@@ -21,10 +21,7 @@ public FunctionalTests()
21
21
22
22
public void Dispose ( )
23
23
{
24
- if ( _context != null )
25
- {
26
- _context . Dispose ( ) ;
27
- }
24
+ _context . Dispose ( ) ;
28
25
}
29
26
30
27
[ Theory ]
@@ -78,11 +75,11 @@ public void IncludeCaseInsensitive(string root, string includePattern, string[]
78
75
"sub/preprocess-source2.cs" ,
79
76
"sub/sub/preprocess-source3.cs" ,
80
77
"sub/sub/preprocess-source3.txt" } ) ]
81
- [ InlineData ( "src/project/compiler/preprocess/" , "preprocess-source1.cs" , new string [ ] {
78
+ [ InlineData ( "src/project/compiler/preprocess/" , "preprocess-source1.cs" , new string [ ] {
82
79
"sub/preprocess-source2.cs" ,
83
80
"sub/sub/preprocess-source3.cs" ,
84
81
"sub/sub/preprocess-source3.txt" } ) ]
85
- [ InlineData ( "src/project/compiler/preprocess/" , "preprocesS-source1.cs" , new string [ ] {
82
+ [ InlineData ( "src/project/compiler/preprocess/" , "preprocesS-source1.cs" , new string [ ] {
86
83
"preprocess-source1.cs" ,
87
84
"sub/preprocess-source2.cs" ,
88
85
"sub/sub/preprocess-source3.cs" ,
@@ -118,11 +115,11 @@ public void ExcludeCaseSensitive(string root, string excludePattern, string[] ex
118
115
"sub/preprocess-source2.cs" ,
119
116
"sub/sub/preprocess-source3.cs" ,
120
117
"sub/sub/preprocess-source3.txt" } ) ]
121
- [ InlineData ( "src/project/compiler/preprocess/" , "preprocess-source1.cs" , new string [ ] {
118
+ [ InlineData ( "src/project/compiler/preprocess/" , "preprocess-source1.cs" , new string [ ] {
122
119
"sub/preprocess-source2.cs" ,
123
120
"sub/sub/preprocess-source3.cs" ,
124
121
"sub/sub/preprocess-source3.txt" } ) ]
125
- [ InlineData ( "src/project/compiler/preprocess/" , "preprocesS-source1.cs" , new string [ ] {
122
+ [ InlineData ( "src/project/compiler/preprocess/" , "preprocesS-source1.cs" , new string [ ] {
126
123
"sub/preprocess-source2.cs" ,
127
124
"sub/sub/preprocess-source3.cs" ,
128
125
"sub/sub/preprocess-source3.txt" } ) ]
@@ -405,9 +402,12 @@ private void ExecuteAndVerify(Matcher matcher, string directoryPath, params stri
405
402
var results = matcher . Execute ( new DirectoryInfoWrapper ( new DirectoryInfo ( directoryPath ) ) ) ;
406
403
407
404
var actual = results . Files . Select ( match => Path . GetFullPath ( Path . Combine ( _context . RootPath , directoryPath , match . Path ) ) ) ;
408
- var expect = expectFiles . Select ( relativePath => Path . GetFullPath ( Path . Combine ( _context . RootPath , relativePath ) ) ) ;
405
+ var expected = expectFiles . Select ( relativePath => Path . GetFullPath ( Path . Combine ( _context . RootPath , relativePath ) ) ) ;
409
406
410
- AssertHelpers . SortAndEqual ( expect , actual , StringComparer . OrdinalIgnoreCase ) ;
407
+ Assert . Equal (
408
+ expected . OrderBy ( e => e ) ,
409
+ actual . OrderBy ( e => e ) ,
410
+ StringComparer . OrdinalIgnoreCase ) ;
411
411
}
412
412
}
413
413
}
0 commit comments