test: clean serializer files
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package sudoku;
|
package sudoku;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@@ -25,6 +26,9 @@ public class SudokuSerializerTest {
|
|||||||
try {
|
try {
|
||||||
otherDoku = SudokuFactory.fromfile(savePath);
|
otherDoku = SudokuFactory.fromfile(savePath);
|
||||||
assert (otherDoku != null);
|
assert (otherDoku != null);
|
||||||
|
// clean file after test
|
||||||
|
File fileToDelete = new File(savePath);
|
||||||
|
fileToDelete.delete();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
assert false;
|
assert false;
|
||||||
|
|||||||
Reference in New Issue
Block a user