File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 1
1
package sc.shared
2
2
3
3
import io.kotest.core.spec.style.StringSpec
4
- import sc.api.plugins.ITeam
4
+ import sc.api.plugins.TestTeam
5
5
import sc.helpers.shouldSerializeTo
6
6
7
7
class WelcomeMessageTest : StringSpec ({
8
8
" XML Serialization" {
9
- val team = object : ITeam {
10
- override val index : Int = 2
11
- override val name = " testi"
12
- override fun opponent(): ITeam = this
13
- }
14
- WelcomeMessage (team) shouldSerializeTo """ <welcomeMessage color="testi"/>"""
9
+ WelcomeMessage (TestTeam .BLUE ) shouldSerializeTo """ <welcomeMessage color="${TestTeam .BLUE .name} "/>"""
15
10
}
16
11
})
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ class LobbyRequestTest: WordSpec({
94
94
game.isPaused shouldBe false
95
95
withClue("Processes moves") {
96
96
game.activePlayer?.color shouldBe TestTeam .RED
97
+ // TODO occasional failure
97
98
playerListeners[0 ].waitForMessage(MoveRequest ::class)
98
99
players[0 ].sendMessageToRoom(roomId, TestMove (1))
99
100
await { game.currentState.state shouldBe 1 }
Original file line number Diff line number Diff line change 1
1
package sc.server.plugins
2
2
3
- import org.slf4j.LoggerFactory
4
3
import sc.api.plugins.exceptions.TooManyPlayersException
5
4
import sc.framework.plugins.AbstractGame
6
5
import sc.framework.plugins.ActionTimeout
@@ -41,7 +40,6 @@ data class TestGame(
41
40
}
42
41
43
42
override fun onPlayerLeft (player : Player , cause : ScoreCause ? ) {
44
- logger.debug(" Player left $player " )
45
43
val result = generateScoreMap().toMutableMap()
46
44
result[player] = PlayerScore (cause ? : ScoreCause .LEFT , " Spieler hat das Spiel verlassen." , 0 )
47
45
notifyOnGameOver(result)
@@ -56,8 +54,4 @@ data class TestGame(
56
54
57
55
override fun toString (): String =
58
56
" TestGame(currentState=$currentState , paused=$isPaused , players=$players )"
59
-
60
- companion object {
61
- private val logger = LoggerFactory .getLogger(TestGame ::class .java)
62
- }
63
57
}
You can’t perform that action at this time.
0 commit comments