From 9f94f51488ae6107606ea3ce0810dc8ac83288b5 Mon Sep 17 00:00:00 2001 From: retgal Date: Sun, 24 Dec 2023 01:14:12 +0100 Subject: [PATCH] Fix test --- .../java/mpo/dayon/common/utils/SystemUtilitiesTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/java/mpo/dayon/common/utils/SystemUtilitiesTest.java b/src/test/java/mpo/dayon/common/utils/SystemUtilitiesTest.java index b3be6210..449cf50d 100644 --- a/src/test/java/mpo/dayon/common/utils/SystemUtilitiesTest.java +++ b/src/test/java/mpo/dayon/common/utils/SystemUtilitiesTest.java @@ -1,6 +1,5 @@ package mpo.dayon.common.utils; -import static java.lang.String.format; import static mpo.dayon.common.utils.SystemUtilities.*; import static org.junit.jupiter.api.Assertions.*; @@ -11,7 +10,6 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; -import java.nio.file.Path; import java.security.NoSuchAlgorithmException; class SystemUtilitiesTest { @@ -118,9 +116,9 @@ void shouldObtainWritableTempDir() throws IOException { } @Test - void shouldObtainJarDir() throws IOException { + void shouldObtainJarDir() { // when, then - assertTrue(new File(format("%s%sdayon.jar", getJarDir(), File.separator)).exists(), "JarDir should contain dayon.jar"); + assertTrue(Files.isDirectory(new File(getJarDir()).toPath()), "JarDir should be a directory"); } }