Cleanup test data in Execute Around tests.

This commit is contained in:
Ilkka Seppala 2015-04-09 18:26:58 +03:00
parent 3628a4539d
commit 717cb53f2b

View File

@ -1,7 +1,10 @@
package com.iluwatar;
import java.io.File;
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
@ -16,4 +19,11 @@ public class AppTest {
String[] args = {};
App.main(args);
}
@Before
@After
public void cleanup() {
File file = new File("testfile.txt");
file.delete();
}
}