tests: test cuberite chat json (1.8)

It worked, but I felt a test is still needed
This commit is contained in:
Bixilon 2023-03-21 19:25:46 +01:00
parent 7f3e533e6d
commit a0736183aa
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -169,6 +169,13 @@ internal class ChatComponentTest {
assertEquals(expected, actual)
}
@Test
fun cuberiteChatJson() {
val expected = BaseComponent(TextComponent("<"), TextComponent("Bixilon"), TextComponent("> "), TextComponent("hello"))
val actual = """{"extra":[{"text":"<"},{"text":"Bixilon"},{"text":"> "},{"text":"hello"}],"text":""}""".chat()
assertEquals(expected, actual)
}
@Test
fun testJson1() {
val text = TextComponent("dummy")