1818
1919import static org .junit .jupiter .api .Assertions .assertEquals ;
2020import static org .junit .jupiter .api .Assertions .assertFalse ;
21+ import static org .junit .jupiter .api .Assertions .assertNull ;
2122import static org .junit .jupiter .api .Assertions .assertTrue ;
2223import static org .junit .jupiter .api .Assertions .fail ;
2324
@@ -105,7 +106,7 @@ public void testFileCleanerFile() throws Exception {
105106 pauseForDeleteToComplete (new File (path ));
106107
107108 assertEquals (0 , theInstance .getTrackCount ());
108- assertEquals ( false , new File (path ).exists (), showFailures ());
109+ assertFalse ( new File (path ).exists (), showFailures ());
109110 }
110111
111112 @ Test
@@ -172,8 +173,8 @@ public void testFileCleanerDirectory_ForceStrategy() throws Exception {
172173 pauseForDeleteToComplete (testFile .getParentFile ());
173174
174175 assertEquals (0 , theInstance .getTrackCount ());
175- assertEquals ( false , new File (testFile .getPath ()).exists (), showFailures ());
176- assertEquals ( false , testFile .getParentFile ().exists (), showFailures ());
176+ assertFalse ( new File (testFile .getPath ()).exists (), showFailures ());
177+ assertFalse ( testFile .getParentFile ().exists (), showFailures ());
177178 }
178179
179180 @ Test
@@ -209,21 +210,21 @@ public void testFileCleanerExitWhenFinishedFirst() throws Exception {
209210 assertFalse (theInstance .exitWhenFinished );
210211 theInstance .exitWhenFinished ();
211212 assertTrue (theInstance .exitWhenFinished );
212- assertEquals ( null , theInstance .reaper );
213+ assertNull ( theInstance .reaper );
213214
214215 waitUntilTrackCount ();
215216
216217 assertEquals (0 , theInstance .getTrackCount ());
217218 assertTrue (theInstance .exitWhenFinished );
218- assertEquals ( null , theInstance .reaper );
219+ assertNull ( theInstance .reaper );
219220 }
220221
221222 @ Test
222223 public void testFileCleanerExitWhenFinished_NoTrackAfter () {
223224 assertFalse (theInstance .exitWhenFinished );
224225 theInstance .exitWhenFinished ();
225226 assertTrue (theInstance .exitWhenFinished );
226- assertEquals ( null , theInstance .reaper );
227+ assertNull ( theInstance .reaper );
227228
228229 final String path = testFile .getPath ();
229230 final Object marker = new Object ();
@@ -234,27 +235,27 @@ public void testFileCleanerExitWhenFinished_NoTrackAfter() {
234235 // expected
235236 }
236237 assertTrue (theInstance .exitWhenFinished );
237- assertEquals ( null , theInstance .reaper );
238+ assertNull ( theInstance .reaper );
238239 }
239240
240241 @ Test
241242 public void testFileCleanerExitWhenFinished1 () throws Exception {
242243 final String path = testFile .getPath ();
243244
244- assertEquals ( false , testFile .exists (), "1-testFile exists: " + testFile );
245+ assertFalse ( testFile .exists (), "1-testFile exists: " + testFile );
245246 RandomAccessFile r = new RandomAccessFile (testFile , "rw" );
246- assertEquals ( true , testFile .exists (), "2-testFile exists" );
247+ assertTrue ( testFile .exists (), "2-testFile exists" );
247248
248249 assertEquals (0 , theInstance .getTrackCount (), "3-Track Count" );
249250 theInstance .track (path , r );
250251 assertEquals (1 , theInstance .getTrackCount (), "4-Track Count" );
251- assertEquals ( false , theInstance .exitWhenFinished , "5-exitWhenFinished" );
252- assertEquals ( true , theInstance .reaper .isAlive (), "6-reaper.isAlive" );
252+ assertFalse ( theInstance .exitWhenFinished , "5-exitWhenFinished" );
253+ assertTrue ( theInstance .reaper .isAlive (), "6-reaper.isAlive" );
253254
254- assertEquals ( false , theInstance .exitWhenFinished , "7-exitWhenFinished" );
255+ assertFalse ( theInstance .exitWhenFinished , "7-exitWhenFinished" );
255256 theInstance .exitWhenFinished ();
256- assertEquals ( true , theInstance .exitWhenFinished , "8-exitWhenFinished" );
257- assertEquals ( true , theInstance .reaper .isAlive (), "9-reaper.isAlive" );
257+ assertTrue ( theInstance .exitWhenFinished , "8-exitWhenFinished" );
258+ assertTrue ( theInstance .reaper .isAlive (), "9-reaper.isAlive" );
258259
259260 r .close ();
260261 testFile = null ;
@@ -264,9 +265,9 @@ public void testFileCleanerExitWhenFinished1() throws Exception {
264265 pauseForDeleteToComplete (new File (path ));
265266
266267 assertEquals (0 , theInstance .getTrackCount (), "10-Track Count" );
267- assertEquals ( false , new File (path ).exists (), "11-testFile exists " + showFailures ());
268- assertEquals ( true , theInstance .exitWhenFinished , "12-exitWhenFinished" );
269- assertEquals ( false , theInstance .reaper .isAlive (), "13-reaper.isAlive" );
268+ assertFalse ( new File (path ).exists (), "11-testFile exists " + showFailures ());
269+ assertTrue ( theInstance .exitWhenFinished , "12-exitWhenFinished" );
270+ assertFalse ( theInstance .reaper .isAlive (), "13-reaper.isAlive" );
270271 }
271272
272273 @ Test
@@ -291,7 +292,7 @@ public void testFileCleanerExitWhenFinished2() throws Exception {
291292 pauseForDeleteToComplete (new File (path ));
292293
293294 assertEquals (0 , theInstance .getTrackCount ());
294- assertEquals ( false , new File (path ).exists (), showFailures ());
295+ assertFalse ( new File (path ).exists (), showFailures ());
295296 assertFalse (theInstance .exitWhenFinished );
296297 assertTrue (theInstance .reaper .isAlive ());
297298
0 commit comments