test: clean serializer files

This commit is contained in:
2025-01-29 15:12:52 +01:00
parent a616ab63e4
commit c0a3f85f24

View File

@@ -1,5 +1,6 @@
package sudoku;
import java.io.File;
import java.util.Random;
import org.json.JSONObject;
@@ -25,6 +26,9 @@ public class SudokuSerializerTest {
try {
otherDoku = SudokuFactory.fromfile(savePath);
assert (otherDoku != null);
// clean file after test
File fileToDelete = new File(savePath);
fileToDelete.delete();
} catch (Exception e) {
e.printStackTrace();
assert false;