JAVA-3297: Cleanup un-committed or un-ignored artifacts (#11068)

This commit is contained in:
freelansam
2021-07-29 00:10:18 +05:30
committed by GitHub
parent 1010d9f494
commit a490f267c9
2 changed files with 19 additions and 1 deletions

View File

@@ -3,6 +3,9 @@ package com.baeldung.transientkw;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import java.io.File;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
class TransientUnitTest {
@@ -31,5 +34,11 @@ class TransientUnitTest {
assertEquals("Fiction", book2.getBookCategory());
}
@AfterAll
public static void cleanup() {
File file = new File(BookSerDe.fileName);
file.deleteOnExit();
}
}