From 830a5551af489cd2e84622408e2d802196af015e Mon Sep 17 00:00:00 2001 From: Esoteric Enderman Date: Sun, 3 Nov 2024 00:01:30 +0000 Subject: [PATCH] Correct the tests --- .../kotlin/foundation/esoteric/utility/file/FileUtilityTest.kt | 2 +- .../foundation/esoteric/utility/resource/ResourceUtilityTest.kt | 2 +- .../foundation/esoteric/utility/string/StringUtilityTest.kt | 2 +- 3 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 6f38065..ee62ea5 100644 --- a/lib/src/test/kotlin/foundation/esoteric/utility/file/FileUtilityTest.kt +++ b/lib/src/test/kotlin/foundation/esoteric/utility/file/FileUtilityTest.kt @@ -67,7 +67,7 @@ class FileUtilityTest { file.createNewFile() file.writeText("Some sample text to test the SHA-1 file hash function.") - assertEquals(file.getSha1Hash(), "d954f0153df726daae33c93f6928fadbfb15fa92") + assertEquals("d954f0153df726daae33c93f6928fadbfb15fa92", file.getSha1Hash()) } @Test fun sha1ZipFileHashWorks() { 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 3881571..9676927 100644 --- a/lib/src/test/kotlin/foundation/esoteric/utility/resource/ResourceUtilityTest.kt +++ b/lib/src/test/kotlin/foundation/esoteric/utility/resource/ResourceUtilityTest.kt @@ -10,7 +10,7 @@ class ResourceUtilityTest { @Test fun resourcesListIsCorrect() { val resourcePaths = Path("resource").getResourceFilePaths() - assertEquals(resourcePaths, setOf(Path.of("resource/ResourceUtilityTest/Test Folder/Test File.txt"), Path.of("resource/ResourceUtilityTest/Test File.txt"))) + assertEquals(setOf(Path.of("resource/ResourceUtilityTest/Test Folder/Test File.txt"), Path.of("resource/ResourceUtilityTest/Test File.txt")), resourcePaths) } @Test fun getResourcePathsThrowsCorrectly() { diff --git a/lib/src/test/kotlin/foundation/esoteric/utility/string/StringUtilityTest.kt b/lib/src/test/kotlin/foundation/esoteric/utility/string/StringUtilityTest.kt index e68d72b..e14951e 100644 --- a/lib/src/test/kotlin/foundation/esoteric/utility/string/StringUtilityTest.kt +++ b/lib/src/test/kotlin/foundation/esoteric/utility/string/StringUtilityTest.kt @@ -7,6 +7,6 @@ class StringUtilityTest { @Test fun sha1HashWorks() { val string = "A string with a few characters in it." - assertEquals(string.getSha1Hash(), "0e7f418083ad73f5006b5ffa1e7ddce617936a64") + assertEquals("0e7f418083ad73f5006b5ffa1e7ddce617936a64", string.getSha1Hash()) } }