diff --git a/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/messages/MessageManagerTest.kt b/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/messages/MessageManagerTest.kt index c1815fa..4900c79 100644 --- a/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/messages/MessageManagerTest.kt +++ b/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/messages/MessageManagerTest.kt @@ -3,10 +3,8 @@ package foundation.esoteric.minecraft.plugins.library.messages import be.seeseemelk.mockbukkit.MockBukkit import foundation.esoteric.minecraft.plugins.library.TestPlugin import java.io.File -import kotlin.test.AfterTest -import kotlin.test.BeforeTest -import kotlin.test.Test -import kotlin.test.assertTrue +import java.util.* +import kotlin.test.* class MessageManagerTest { @@ -25,6 +23,11 @@ class MessageManagerTest { assertTrue(messagesFolder.exists()) } + @Test fun getMessageWorks() { + val message = messageManager!!.getRawMessage(Locale.forLanguageTag("en-uk"), "test-message") + assertEquals(message, "Test") + } + @AfterTest fun unmockMessageManager() { MockBukkit.unmock() } diff --git a/lib/src/test/resources/messages/en-uk.yml b/lib/src/test/resources/messages/en-uk.yml index e69de29..89ba1ff 100644 --- a/lib/src/test/resources/messages/en-uk.yml +++ b/lib/src/test/resources/messages/en-uk.yml @@ -0,0 +1 @@ +test-message: "Test"