mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
[BUGFIX] Added throwable to method, instead of catching
This commit is contained in:
@@ -13,22 +13,18 @@ import java.io.IOException;
|
||||
public class CacheValidationTest {
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
try {
|
||||
File fileOne = new File(Directories.getCachePath(), "should-exist.tmp");
|
||||
File fileTwo = new File(Directories.getCachePath(), "should-not-exist.tmp");
|
||||
public void test() throws IOException {
|
||||
File fileOne = new File(Directories.getCachePath(), "should-exist.tmp");
|
||||
File fileTwo = new File(Directories.getCachePath(), "should-not-exist.tmp");
|
||||
|
||||
fileOne.createNewFile();
|
||||
fileTwo.createNewFile();
|
||||
fileOne.createNewFile();
|
||||
fileTwo.createNewFile();
|
||||
|
||||
fileTwo.setLastModified(System.currentTimeMillis() / 1000 - 350000);
|
||||
fileTwo.setLastModified(System.currentTimeMillis() / 1000 - 350000);
|
||||
|
||||
Directories.clearCache(259200, false);
|
||||
Directories.clearCache(259200, false);
|
||||
|
||||
Assert.assertTrue(fileOne.exists());
|
||||
Assert.assertTrue(!fileTwo.exists());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Assert.assertTrue(fileOne.exists());
|
||||
Assert.assertTrue(!fileTwo.exists());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user