Skip to content

Commit

Permalink
Test message features
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Oct 30, 2024
1 parent 894a5e5 commit c103cff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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()
}
Expand Down
1 change: 1 addition & 0 deletions lib/src/test/resources/messages/en-uk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test-message: "Test"

0 comments on commit c103cff

Please sign in to comment.