Add cleanUp
This commit is contained in:
parent
5d29ae5bbd
commit
725a7b2a7a
@ -9,6 +9,7 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
@ -57,8 +58,7 @@ public class LastModifiedFileAppUnitTest {
|
|||||||
Path lastModPath = LastModifiedFileApp.findUsingNIOApi(SOURCEDIRECTORY);
|
Path lastModPath = LastModifiedFileApp.findUsingNIOApi(SOURCEDIRECTORY);
|
||||||
|
|
||||||
assertThat(lastModPath).isNotNull();
|
assertThat(lastModPath).isNotNull();
|
||||||
assertThat(lastModPath.toFile()
|
assertThat(lastModPath.toFile().getName()).isEqualTo("file02.txt");
|
||||||
.getName()).isEqualTo("file02.txt");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -69,4 +69,10 @@ public class LastModifiedFileAppUnitTest {
|
|||||||
assertThat(lastModFile.getName()).isEqualTo("file02.txt");
|
assertThat(lastModFile.getName()).isEqualTo("file02.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterAll
|
||||||
|
public static void cleanUp() throws IOException {
|
||||||
|
File srcDir = new File(SOURCEDIRECTORY);
|
||||||
|
FileUtils.deleteDirectory(srcDir);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user