Search in sources :

Example 1 with AfterEach

use of org.junit.jupiter.api.AfterEach in project java-design-patterns by iluwatar.

the class AppTest method cleanup.

@BeforeEach
@AfterEach
public void cleanup() {
    File file = new File("testfile.txt");
    file.delete();
}
Also used : File(java.io.File) BeforeEach(org.junit.jupiter.api.BeforeEach) AfterEach(org.junit.jupiter.api.AfterEach)

Example 2 with AfterEach

use of org.junit.jupiter.api.AfterEach in project java-design-patterns by iluwatar.

the class AppTest method cleanup.

@BeforeEach
@AfterEach
public void cleanup() {
    File file1 = new File("fish1.out");
    file1.delete();
    File file2 = new File("fish2.out");
    file2.delete();
}
Also used : File(java.io.File) BeforeEach(org.junit.jupiter.api.BeforeEach) AfterEach(org.junit.jupiter.api.AfterEach)

Aggregations

File (java.io.File)2 AfterEach (org.junit.jupiter.api.AfterEach)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2