@@ -21,9 +21,8 @@ public async Task ExtractToDirectory_MissingDestinationDirectory_ShouldCreateDir
2121
2222 FileSystem . ZipFile ( ) . ExtractToDirectory ( "destination.zip" , "bar" ) ;
2323
24- await That ( FileSystem ) . HasFile ( "bar/test.txt" ) ;
25- await That ( FileSystem . File . ReadAllBytes ( "bar/test.txt" ) )
26- . IsEqualTo ( FileSystem . File . ReadAllBytes ( "foo/test.txt" ) ) ;
24+ await That ( FileSystem ) . HasFile ( "bar/test.txt" )
25+ . WithContent ( ) . SameAs ( "foo/test.txt" ) ;
2726 }
2827
2928 [ Fact ]
@@ -120,9 +119,8 @@ public async Task ExtractToDirectory_WithEncoding_ShouldZipDirectoryContent(
120119
121120 FileSystem . ZipFile ( ) . ExtractToDirectory ( "destination.zip" , "bar" , encoding ) ;
122121
123- await That ( FileSystem ) . HasFile ( FileSystem . Path . Combine ( "bar" , "test.txt" ) ) ;
124- await That ( FileSystem . File . ReadAllBytes ( FileSystem . Path . Combine ( "bar" , "test.txt" ) ) )
125- . IsEqualTo ( FileSystem . File . ReadAllBytes ( FileSystem . Path . Combine ( "foo" , "test.txt" ) ) ) ;
122+ await That ( FileSystem ) . HasFile ( FileSystem . Path . Combine ( "bar" , "test.txt" ) )
123+ . WithContent ( ) . SameAs ( FileSystem . Path . Combine ( "foo" , "test.txt" ) ) ;
126124 }
127125
128126 [ Theory ]
@@ -155,7 +153,8 @@ await That(FileSystem.File.ReadAllText(destinationPath))
155153
156154#if FEATURE_COMPRESSION_STREAM
157155 [ Fact ]
158- public async Task ExtractToDirectory_WithStream_MissingDestinationDirectory_ShouldCreateDirectory ( )
156+ public async Task
157+ ExtractToDirectory_WithStream_MissingDestinationDirectory_ShouldCreateDirectory ( )
159158 {
160159 FileSystem . Initialize ( )
161160 . WithSubdirectory ( "foo" ) . Initialized ( s => s
@@ -166,9 +165,8 @@ public async Task ExtractToDirectory_WithStream_MissingDestinationDirectory_Shou
166165
167166 FileSystem . ZipFile ( ) . ExtractToDirectory ( stream , "bar" ) ;
168167
169- await That ( FileSystem ) . HasFile ( "bar/test.txt" ) ;
170- await That ( FileSystem . File . ReadAllBytes ( "bar/test.txt" ) )
171- . IsEqualTo ( FileSystem . File . ReadAllBytes ( "foo/test.txt" ) ) ;
168+ await That ( FileSystem ) . HasFile ( "bar/test.txt" )
169+ . WithContent ( ) . SameAs ( "foo/test.txt" ) ;
172170 }
173171#endif
174172
@@ -276,17 +274,17 @@ public async Task ExtractToDirectory_WithStream_WithEncoding_ShouldZipDirectoryC
276274
277275 FileSystem . ZipFile ( ) . ExtractToDirectory ( stream , "bar" , encoding ) ;
278276
279- await That ( FileSystem ) . HasFile ( FileSystem . Path . Combine ( "bar" , "test.txt" ) ) ;
280- await That ( FileSystem . File . ReadAllBytes ( FileSystem . Path . Combine ( "bar" , "test.txt" ) ) )
281- . IsEqualTo ( FileSystem . File . ReadAllBytes ( FileSystem . Path . Combine ( "foo" , "test.txt" ) ) ) ;
277+ await That ( FileSystem ) . HasFile ( FileSystem . Path . Combine ( "bar" , "test.txt" ) )
278+ . WithContent ( ) . SameAs ( FileSystem . Path . Combine ( "foo" , "test.txt" ) ) ;
282279 }
283280#endif
284281
285282#if FEATURE_COMPRESSION_STREAM
286283 [ Theory ]
287284 [ AutoData ]
288- public async Task ExtractToDirectory_WithStream_WithoutOverwriteAndExistingFile_ShouldOverwriteFile (
289- string contents )
285+ public async Task
286+ ExtractToDirectory_WithStream_WithoutOverwriteAndExistingFile_ShouldOverwriteFile (
287+ string contents )
290288 {
291289 FileSystem . Initialize ( )
292290 . WithSubdirectory ( "bar" ) . Initialized ( s => s
0 commit comments