@@ -70,29 +70,23 @@ public void shouldUnzipZipFileIntoDestinationFolderWhenDeflateSolid() throws IOE
70
70
Path dstDir = Zip4jvmSuite .subDirNameAsMethodName (rootDir );
71
71
72
72
UnzipIt .zip (zipDeflateSolid ).dstDir (dstDir ).extract (dirNameCars );
73
-
74
- assertThatDirectory (dstDir ).exists ().hasDirectories (1 ).hasRegularFiles (0 );
75
- assertThatDirectory (dstDir .resolve (dirNameCars )).matches (dirCarsAssert );
73
+ assertThatDirectory (dstDir ).matches (dirCarsAssert );
76
74
}
77
75
78
76
public void shouldUnzipZipFileIntoDestinationFolderWhenDeflateSolidPkware () throws IOException {
79
77
Path dstDir = Zip4jvmSuite .subDirNameAsMethodName (rootDir );
80
78
UnzipSettings settings = UnzipSettings .builder ().password (password ).build ();
81
79
82
80
UnzipIt .zip (zipDeflateSolid ).settings (settings ).dstDir (dstDir ).extract (dirNameCars );
83
-
84
- assertThatDirectory (dstDir ).exists ().hasDirectories (1 ).hasRegularFiles (0 );
85
- assertThatDirectory (dstDir .resolve (dirNameCars )).matches (dirCarsAssert );
81
+ assertThatDirectory (dstDir ).matches (dirCarsAssert );
86
82
}
87
83
88
84
public void shouldUnzipZipFileIntoDestinationFolderWhenDeflateSolidAes () throws IOException {
89
85
Path dstDir = Zip4jvmSuite .subDirNameAsMethodName (rootDir );
90
86
UnzipSettings settings = UnzipSettings .builder ().passwordProvider (fileNamePasswordProvider ).build ();
91
87
92
88
UnzipIt .zip (zipDeflateSolid ).settings (settings ).dstDir (dstDir ).extract (dirNameCars );
93
-
94
- assertThatDirectory (dstDir ).exists ().hasDirectories (1 ).hasRegularFiles (0 );
95
- assertThatDirectory (dstDir .resolve (dirNameCars )).matches (dirCarsAssert );
89
+ assertThatDirectory (dstDir ).matches (dirCarsAssert );
96
90
}
97
91
98
92
public void shouldCorrectlySetLastTimeStampWhenUnzip () throws IOException , ParseException {
@@ -113,6 +107,13 @@ public void shouldCorrectlySetLastTimeStampWhenUnzip() throws IOException, Parse
113
107
assertThat (convert (Files .getLastModifiedTime (fileFooUnzip ).toMillis ())).isEqualTo (str );
114
108
}
115
109
110
+ public void shouldUnzipZipFileIntoDestinationFolderWhenStoreSolid () throws IOException {
111
+ Path dstDir = Zip4jvmSuite .subDirNameAsMethodName (rootDir );
112
+
113
+ UnzipIt .zip (zipDeflateSolid ).dstDir (dstDir ).extract (dirNameCars );
114
+ assertThatDirectory (dstDir ).matches (dirCarsAssert );
115
+ }
116
+
116
117
private static long convert (String str ) throws ParseException {
117
118
return new SimpleDateFormat ("yyyy.MM.dd'T'HH:mm:ss" , Locale .ENGLISH ).parse (str ).getTime ();
118
119
}
0 commit comments