mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-17 00:56:54 +01:00
updated deletion and logging of temporary files to resolve issue #73
Former-commit-id: 7acc91ef84a01b021c5d619602b8a0a7f656947a
This commit is contained in:
@@ -22,6 +22,7 @@ import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
@@ -76,7 +77,8 @@ public class FileUtilsTest {
|
||||
if (!file.exists()) {
|
||||
fail("Unable to create a temporary file.");
|
||||
}
|
||||
FileUtils.delete(file);
|
||||
boolean status = FileUtils.delete(file);
|
||||
assertTrue("delete returned a failed status", status);
|
||||
assertFalse("Temporary file exists after attempting deletion", file.exists());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user