Skip to content

Commit

Permalink
test(plugin25): room packet XML
Browse files Browse the repository at this point in the history
  • Loading branch information
xeruf committed Jun 5, 2024
1 parent f0cb80f commit edd242c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugin/src/test/kotlin/sc/plugin2025/MoveTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.*
import io.kotest.matchers.collections.*
import sc.helpers.shouldSerializeTo
import sc.protocol.room.RoomPacket
import sc.shared.InvalidMoveException

class MoveTest: WordSpec({
Expand Down Expand Up @@ -208,4 +209,14 @@ class MoveTest: WordSpec({
ExchangeCarrots(-10) shouldSerializeTo "<exchangecarrots amount=\"-10\"/>"
}
}

"Move" should {
"produce a nice room message" {
RoomPacket("abcd", Advance(3)) shouldSerializeTo """
<room roomId="abcd">
<data class="advance" distance="3"/>
</room>
""".trimIndent()
}
}
})

0 comments on commit edd242c

Please sign in to comment.