Cleaned up the IOUtilsTest class a bit
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2022-05-03 00:17:50 -04:00
parent 204a5e15f1
commit 347211d566

View File

@ -2,16 +2,19 @@ package tech.bitgoblin.io;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.junit.AfterClass;
import org.junit.Test; import org.junit.Test;
import java.io.File; import java.io.File;
public class IOUtilsTest { public class IOUtilsTest {
private static String testDir = "test-temp";
@Test @Test
public void shouldCreateDirectory() { public void shouldCreateDirectory() {
IOUtils.createDirectory("test-temp.txt"); IOUtils.createDirectory(testDir);
assertTrue(new File("test-temp.txt").exists()); assertTrue(new File(testDir).exists());
} }
@Test @Test
@ -25,4 +28,9 @@ public class IOUtilsTest {
IOUtils.resolveTilda("~test"); IOUtils.resolveTilda("~test");
} }
@AfterClass
public static void cleanup() {
new File(testDir).delete();
}
} }