@@ -121,25 +121,25 @@ public async Task InaccessibleDirectory_MarkedAsInaccessibleAndSkipped_Windows()
121121 var accessibleDirDesc = part . DirectoryDescriptions
122122 . FirstOrDefault ( d => d . RelativePath . EndsWith ( "/accessible" , StringComparison . Ordinal ) ) ;
123123 accessibleDirDesc . Should ( ) . NotBeNull ( ) ;
124- accessibleDirDesc ! . IsAccessible . Should ( ) . BeTrue ( ) ;
124+ accessibleDirDesc . IsAccessible . Should ( ) . BeTrue ( ) ;
125125
126126 var inaccessibleDirDesc = part . DirectoryDescriptions
127127 . FirstOrDefault ( d => d . RelativePath . EndsWith ( "/inaccessible" , StringComparison . Ordinal ) ) ;
128128 inaccessibleDirDesc . Should ( ) . NotBeNull ( ) ;
129129
130- if ( inaccessibleDirDesc ! . IsAccessible )
130+ if ( inaccessibleDirDesc . IsAccessible )
131131 {
132132 Assert . Ignore (
133133 "Directory permissions were not enforced by the OS - test cannot verify access control (likely running with elevated permissions)" ) ;
134134 }
135135
136136 inaccessibleDirDesc . IsAccessible . Should ( ) . BeFalse ( ) ;
137137
138- var file1 = part . FileDescriptions . FirstOrDefault ( f => f . RelativePath . EndsWith ( "/ file1.txt") ) ;
138+ var file1 = part . FileDescriptions . FirstOrDefault ( f => f . RelativePath . Contains ( " file1.txt") ) ;
139139 file1 . Should ( ) . NotBeNull ( ) ;
140- file1 ! . IsAccessible . Should ( ) . BeTrue ( ) ;
140+ file1 . IsAccessible . Should ( ) . BeTrue ( ) ;
141141
142- var file2 = part . FileDescriptions . FirstOrDefault ( f => f . RelativePath . EndsWith ( "/ file2.txt") ) ;
142+ var file2 = part . FileDescriptions . FirstOrDefault ( f => f . RelativePath . Contains ( " file2.txt") ) ;
143143 file2 . Should ( ) . BeNull ( "the file in an inaccessible directory should not be inventoried" ) ;
144144 }
145145 finally
@@ -217,25 +217,25 @@ public async Task InaccessibleDirectory_MarkedAsInaccessibleAndSkipped_Posix()
217217 var accessibleDirDesc = part . DirectoryDescriptions
218218 . FirstOrDefault ( d => d . RelativePath . EndsWith ( "/accessible" , StringComparison . Ordinal ) ) ;
219219 accessibleDirDesc . Should ( ) . NotBeNull ( ) ;
220- accessibleDirDesc ! . IsAccessible . Should ( ) . BeTrue ( ) ;
220+ accessibleDirDesc . IsAccessible . Should ( ) . BeTrue ( ) ;
221221
222222 var inaccessibleDirDesc = part . DirectoryDescriptions
223223 . FirstOrDefault ( d => d . RelativePath . EndsWith ( "/inaccessible" , StringComparison . Ordinal ) ) ;
224224 inaccessibleDirDesc . Should ( ) . NotBeNull ( ) ;
225225
226- if ( inaccessibleDirDesc ! . IsAccessible )
226+ if ( inaccessibleDirDesc . IsAccessible )
227227 {
228228 Assert . Ignore (
229229 "Directory permissions were not enforced by the OS - test cannot verify access control (likely running with elevated permissions)" ) ;
230230 }
231231
232232 inaccessibleDirDesc . IsAccessible . Should ( ) . BeFalse ( ) ;
233233
234- var file1 = part . FileDescriptions . FirstOrDefault ( f => f . RelativePath . EndsWith ( "/ file1.txt") ) ;
234+ var file1 = part . FileDescriptions . FirstOrDefault ( f => f . RelativePath . Contains ( " file1.txt") ) ;
235235 file1 . Should ( ) . NotBeNull ( ) ;
236- file1 ! . IsAccessible . Should ( ) . BeTrue ( ) ;
236+ file1 . IsAccessible . Should ( ) . BeTrue ( ) ;
237237
238- var file2 = part . FileDescriptions . FirstOrDefault ( f => f . RelativePath . EndsWith ( "/ file2.txt") ) ;
238+ var file2 = part . FileDescriptions . FirstOrDefault ( f => f . RelativePath . Contains ( " file2.txt") ) ;
239239 file2 . Should ( ) . BeNull ( "the file in an inaccessible directory should not be inventoried" ) ;
240240 }
241241 finally
0 commit comments