22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- import 'package:archive/archive.dart' ;
65import 'package:file/memory.dart' ;
76import 'package:file/src/interface/file.dart' ;
87import 'package:file_testing/file_testing.dart' ;
@@ -314,7 +313,7 @@ void main() {
314313 'test message' ,
315314 Uri .parse ('http:///test.zip' ),
316315 fileSystem.currentDirectory.childDirectory ('out' ),
317- ), throwsA (isA <ProcessException >()));
316+ ), throwsA (isA <Exception >()));
318317 expect (fileSystem.file ('te,[/test' ), isNot (exists));
319318 expect (fileSystem.file ('out/test' ), isNot (exists));
320319 });
@@ -338,7 +337,7 @@ void main() {
338337 'test message' ,
339338 Uri .parse ('http:///test.zip' ),
340339 fileSystem.currentDirectory.childDirectory ('out' ),
341- ), throwsA (isA <ArchiveException >()));
340+ ), throwsA (isA <Exception >()));
342341 expect (fileSystem.file ('te,[/test' ), isNot (exists));
343342 expect (fileSystem.file ('out/test' ), isNot (exists));
344343 });
@@ -401,10 +400,7 @@ class MockOperatingSystemUtils extends Mock implements OperatingSystemUtils {
401400 void unzip (File file, Directory targetDirectory) {
402401 if (failures > 0 ) {
403402 failures -= 1 ;
404- if (windows) {
405- throw ArchiveException ('zip' );
406- }
407- throw const ProcessException ('zip' , < String > [], 'Failed to unzip' );
403+ throw Exception ();
408404 }
409405 targetDirectory.childFile (file.fileSystem.path.basenameWithoutExtension (file.path))
410406 .createSync ();
@@ -414,10 +410,7 @@ class MockOperatingSystemUtils extends Mock implements OperatingSystemUtils {
414410 void unpack (File gzippedTarFile, Directory targetDirectory) {
415411 if (failures > 0 ) {
416412 failures -= 1 ;
417- if (windows) {
418- throw ArchiveException ('zip' );
419- }
420- throw const ProcessException ('zip' , < String > [], 'Failed to unzip' );
413+ throw Exception ();
421414 }
422415 targetDirectory.childFile (gzippedTarFile.fileSystem.path.basenameWithoutExtension (gzippedTarFile.path))
423416 .createSync ();
0 commit comments