Cleanup test data in Execute Around tests.
This commit is contained in:
		| @@ -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(); | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user