Create PlayerNotificationListenerTest

This commit is contained in:
2025-03-18 22:43:08 +01:00
parent c762f31449
commit c28bc00679
5 changed files with 41 additions and 7 deletions

View File

@@ -175,8 +175,8 @@ class GameSimulationTest :
val eventStore by inject<GameEventStore>()
val playerNotificationListener by inject<PlayerNotificationListener>()
ReactionListener(get(), get()).init()
playerNotificationListener.startListening({ channelNotification1.trySendBlocking(it) }, player1, gameId)
playerNotificationListener.startListening({ channelNotification2.trySendBlocking(it) }, player2, gameId)
playerNotificationListener.startListening(player1, gameId) { channelNotification1.trySendBlocking(it) }
playerNotificationListener.startListening(player2, gameId) { channelNotification2.trySendBlocking(it) }
GlobalScope.launch(Dispatchers.IO) {
commandHandler.handle(player1, gameId, channelCommand1, channelNotification1)