From 720b7a23fa56123e3008b82933554bea5dbf8346 Mon Sep 17 00:00:00 2001 From: Esoteric Enderman Date: Sun, 3 Nov 2024 01:05:56 +0000 Subject: [PATCH] Simplify tests --- .../foundation/esoteric/utility/file/FileUtilityTest.kt | 2 +- .../esoteric/utility/resource/ResourceUtilityTest.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/test/kotlin/foundation/esoteric/utility/file/FileUtilityTest.kt b/lib/src/test/kotlin/foundation/esoteric/utility/file/FileUtilityTest.kt index 0e9ff2d..6e5e422 100644 --- a/lib/src/test/kotlin/foundation/esoteric/utility/file/FileUtilityTest.kt +++ b/lib/src/test/kotlin/foundation/esoteric/utility/file/FileUtilityTest.kt @@ -69,7 +69,7 @@ class FileUtilityTest { } @Test fun sha1ZipWorks() { - val resourcePack = File(run.path, "TestPluginResourcePack.zip") + val resourcePack = File(run, "TestPluginResourcePack.zip") Path("file/FileUtilityTest/TestPluginResourcePack.zip").saveResource(resourcePack.toPath()) diff --git a/lib/src/test/kotlin/foundation/esoteric/utility/resource/ResourceUtilityTest.kt b/lib/src/test/kotlin/foundation/esoteric/utility/resource/ResourceUtilityTest.kt index 4d33f74..49a72f9 100644 --- a/lib/src/test/kotlin/foundation/esoteric/utility/resource/ResourceUtilityTest.kt +++ b/lib/src/test/kotlin/foundation/esoteric/utility/resource/ResourceUtilityTest.kt @@ -30,7 +30,7 @@ class ResourceUtilityTest { @Test fun savingResourceWorks() { val saveLocation = File(run, "Test File.txt") val resourcePath = Path("resource/ResourceUtilityTest/Test File.txt") - resourcePath.saveResource(saveLocation.toPath()) + resourcePath.saveResource(saveLocation) assertTrue(saveLocation.exists()) assertTrue(saveLocation.isFile) @@ -41,7 +41,7 @@ class ResourceUtilityTest { @Test fun savingResourcesWorks() { val saveFolder = File(run, "Save Folder") val resourcePath = Path.of("resource") - resourcePath.saveResources(saveFolder.toPath()) + resourcePath.saveResources(saveFolder) assertTrue(saveFolder.exists()) assertTrue(saveFolder.isDirectory)