[JAVA-32168] Cleanup un-committed or un-ignored artifacts - Week 11 - 2024 (#16124)
This commit is contained in:
+13
@@ -1,5 +1,6 @@
|
||||
package com.baeldung.writehashmaptocsvfile;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
@@ -63,4 +64,16 @@ public class WriteHashmaptoCVSFileUnitTest {
|
||||
// Ensure the CSV file exists
|
||||
assertTrue(new File("employee_data2.csv").exists());
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
public static void cleanUp() {
|
||||
final File employeeData = new File("employee_data.csv");
|
||||
if (employeeData.exists()) {
|
||||
employeeData.deleteOnExit();
|
||||
}
|
||||
final File employeeData2 = new File("employee_data2.csv");
|
||||
if (employeeData2.exists()) {
|
||||
employeeData2.deleteOnExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user