Skip to content

Commit a42c7e5

Browse files
committed
test(plugin25): extend MoveTest
1 parent 3a416e6 commit a42c7e5

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

plugin2025/src/test/kotlin/sc/plugin2025/MoveTest.kt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,28 @@ class MoveTest: WordSpec({
214214
}
215215

216216
"Move" should {
217-
"produce a nice room message" {
217+
"produce concise room message" {
218+
RoomPacket("abcd", EatSalad) shouldSerializeTo """
219+
<room roomId="abcd">
220+
<data class="eatsalad"/>
221+
</room>
222+
""".trimIndent()
223+
}
224+
"produce concise room message for carrots" {
225+
RoomPacket("abcd", ExchangeCarrots(-10)) shouldSerializeTo """
226+
<room roomId="abcd">
227+
<data class="exchangecarrots" amount="-10"/>
228+
</room>
229+
""".trimIndent()
230+
}
231+
"produce concise room message for advance" {
218232
RoomPacket("abcd", Advance(3)) shouldSerializeTo """
219233
<room roomId="abcd">
220234
<data class="advance" distance="3"/>
221235
</room>
222236
""".trimIndent()
223237
}
224-
"serialize Advance properly" {
238+
"serialize full Advance" {
225239
Advance(5, Card.EAT_SALAD) shouldSerializeTo """
226240
<advance distance="5">
227241
<card>EAT_SALAD</card>

0 commit comments

Comments
 (0)