36
36
*
37
37
* @author <a href="mailto:[email protected] ">Markus KARG</a>
38
38
*/
39
- public class AbstractUnArchiverTest {
39
+ class AbstractUnArchiverTest {
40
40
private AbstractUnArchiver abstractUnArchiver ;
41
41
42
42
@ BeforeEach
43
- public void setUp () {
43
+ void setUp () {
44
44
this .abstractUnArchiver = new AbstractUnArchiver () {
45
45
@ Override
46
46
protected void execute (final String path , final File outputDirectory ) throws ArchiverException {
@@ -55,13 +55,12 @@ protected void execute() throws ArchiverException {
55
55
}
56
56
57
57
@ AfterEach
58
- public void tearDown () {
58
+ void tearDown () {
59
59
this .abstractUnArchiver = null ;
60
60
}
61
61
62
62
@ Test
63
- public void shouldThrowExceptionBecauseRewrittenPathIsOutOfDirectory (@ TempDir File targetFolder )
64
- throws ArchiverException {
63
+ void shouldThrowExceptionBecauseRewrittenPathIsOutOfDirectory (@ TempDir File targetFolder ) throws ArchiverException {
65
64
// given
66
65
67
66
// The prefix includes the target directory name to make sure we catch cases when the paths
@@ -82,7 +81,7 @@ public void shouldThrowExceptionBecauseRewrittenPathIsOutOfDirectory(@TempDir Fi
82
81
}
83
82
84
83
@ Test
85
- public void shouldExtractWhenFileOnDiskDoesNotExist (@ TempDir File temporaryFolder ) throws IOException {
84
+ void shouldExtractWhenFileOnDiskDoesNotExist (@ TempDir File temporaryFolder ) throws IOException {
86
85
// given
87
86
File file = new File (temporaryFolder , "whatever.txt" ); // does not create the file!
88
87
String entryname = file .getName ();
@@ -96,7 +95,7 @@ public void shouldExtractWhenFileOnDiskDoesNotExist(@TempDir File temporaryFolde
96
95
}
97
96
98
97
@ Test
99
- public void shouldExtractWhenFileOnDiskIsNewerThanEntryInArchive (@ TempDir File temporaryFolder ) throws IOException {
98
+ void shouldExtractWhenFileOnDiskIsNewerThanEntryInArchive (@ TempDir File temporaryFolder ) throws IOException {
100
99
// given
101
100
File file = new File (temporaryFolder , "whatever.txt" );
102
101
file .createNewFile ();
@@ -112,8 +111,8 @@ public void shouldExtractWhenFileOnDiskIsNewerThanEntryInArchive(@TempDir File t
112
111
}
113
112
114
113
@ Test
115
- public void shouldExtractWhenFileOnDiskIsNewerThanEntryInArchive_andWarnAboutDifferentCasing (
116
- @ TempDir File temporaryFolder ) throws IOException {
114
+ void shouldExtractWhenFileOnDiskIsNewerThanEntryInArchive_andWarnAboutDifferentCasing (@ TempDir File temporaryFolder )
115
+ throws IOException {
117
116
// given
118
117
File file = new File (temporaryFolder , "whatever.txt" );
119
118
file .createNewFile ();
@@ -127,7 +126,7 @@ public void shouldExtractWhenFileOnDiskIsNewerThanEntryInArchive_andWarnAboutDif
127
126
}
128
127
129
128
@ Test
130
- public void shouldExtractWhenEntryInArchiveIsNewerThanFileOnDisk (@ TempDir File temporaryFolder ) throws IOException {
129
+ void shouldExtractWhenEntryInArchiveIsNewerThanFileOnDisk (@ TempDir File temporaryFolder ) throws IOException {
131
130
// given
132
131
File file = new File (temporaryFolder , "whatever.txt" );
133
132
file .createNewFile ();
@@ -143,8 +142,8 @@ public void shouldExtractWhenEntryInArchiveIsNewerThanFileOnDisk(@TempDir File t
143
142
}
144
143
145
144
@ Test
146
- public void shouldExtractWhenEntryInArchiveIsNewerThanFileOnDiskAndWarnAboutDifferentCasing (
147
- @ TempDir File temporaryFolder ) throws IOException {
145
+ void shouldExtractWhenEntryInArchiveIsNewerThanFileOnDiskAndWarnAboutDifferentCasing (@ TempDir File temporaryFolder )
146
+ throws IOException {
148
147
// given
149
148
File file = new File (temporaryFolder , "whatever.txt" );
150
149
file .createNewFile ();
@@ -161,7 +160,7 @@ public void shouldExtractWhenEntryInArchiveIsNewerThanFileOnDiskAndWarnAboutDiff
161
160
}
162
161
163
162
@ Test
164
- public void shouldNotWarnAboutDifferentCasingForDirectoryEntries (@ TempDir File temporaryFolder ) throws IOException {
163
+ void shouldNotWarnAboutDifferentCasingForDirectoryEntries (@ TempDir File temporaryFolder ) throws IOException {
165
164
// given
166
165
File file = new File (temporaryFolder , "whatever.txt" );
167
166
file .createNewFile ();
@@ -176,7 +175,7 @@ public void shouldNotWarnAboutDifferentCasingForDirectoryEntries(@TempDir File t
176
175
}
177
176
178
177
@ Test
179
- public void shouldExtractWhenCasingDifferOnlyInEntryNamePath (@ TempDir File temporaryFolder ) throws IOException {
178
+ void shouldExtractWhenCasingDifferOnlyInEntryNamePath (@ TempDir File temporaryFolder ) throws IOException {
180
179
// given
181
180
String entryName = "directory/whatever.txt" ;
182
181
File file = new File (temporaryFolder , entryName ); // does not create the file!
0 commit comments