diff --git a/util/src/test/java/dev/openrs2/util/StringUtilsTest.java b/util/src/test/java/dev/openrs2/util/StringUtilsTest.java deleted file mode 100644 index 90a0421928..0000000000 --- a/util/src/test/java/dev/openrs2/util/StringUtilsTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package dev.openrs2.util; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - -public final class StringUtilsTest { - @Test - public void testIndefiniteArticle() { - assertEquals("a", StringUtils.indefiniteArticle("book")); - assertEquals("an", StringUtils.indefiniteArticle("aeroplane")); - - assertThrows(IllegalArgumentException.class, () -> StringUtils.indefiniteArticle("")); - } - - @Test - public void testCapitalize() { - assertEquals("Hello", StringUtils.capitalize("hello")); - assertEquals("", StringUtils.capitalize("")); - } -} diff --git a/util/src/test/java/dev/openrs2/util/StringUtilsTest.kt b/util/src/test/java/dev/openrs2/util/StringUtilsTest.kt new file mode 100644 index 0000000000..d63374e6cc --- /dev/null +++ b/util/src/test/java/dev/openrs2/util/StringUtilsTest.kt @@ -0,0 +1,24 @@ +package dev.openrs2.util + +import dev.openrs2.util.StringUtils.capitalize +import dev.openrs2.util.StringUtils.indefiniteArticle +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFailsWith + +object StringUtilsTest { + @Test + fun testIndefiniteArticle() { + assertEquals("a", indefiniteArticle("book")) + assertEquals("an", indefiniteArticle("aeroplane")) + assertFailsWith(IllegalArgumentException::class) { + indefiniteArticle("") + } + } + + @Test + fun testCapitalize() { + assertEquals("Hello", capitalize("hello")) + assertEquals("", capitalize("")) + } +}