update ktlint rules
This commit is contained in:
@@ -20,26 +20,26 @@ import kotlin.test.assertIs
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
class GameCommandHandlerTest :
|
||||
FunSpec({
|
||||
test("handle a command should execute the command") {
|
||||
koinApplication { modules(appKoinModule) }.koin.apply {
|
||||
val commandHandler by inject<GameCommandHandler>()
|
||||
val notificationListener by inject<PlayerNotificationEventListener>()
|
||||
val gameId = GameId()
|
||||
val player = Player("Tesla")
|
||||
val channelCommand = Channel<GameCommand>(Channel.BUFFERED)
|
||||
val channelNotification = Channel<Notification>(Channel.BUFFERED)
|
||||
ReactionEventListener(get(), get(), get()).init()
|
||||
notificationListener.startListening(channelNotification, player)
|
||||
FunSpec({
|
||||
test("handle a command should execute the command") {
|
||||
koinApplication { modules(appKoinModule) }.koin.apply {
|
||||
val commandHandler by inject<GameCommandHandler>()
|
||||
val notificationListener by inject<PlayerNotificationEventListener>()
|
||||
val gameId = GameId()
|
||||
val player = Player("Tesla")
|
||||
val channelCommand = Channel<GameCommand>(Channel.BUFFERED)
|
||||
val channelNotification = Channel<Notification>(Channel.BUFFERED)
|
||||
ReactionEventListener(get(), get(), get()).init()
|
||||
notificationListener.startListening(channelNotification, player)
|
||||
|
||||
GlobalScope.launch {
|
||||
commandHandler.handle(player, channelCommand, channelNotification)
|
||||
}
|
||||
|
||||
channelCommand.send(IWantToJoinTheGameCommand(IWantToJoinTheGameCommand.Payload(gameId, player)))
|
||||
assertIs<WelcomeToTheGameNotification>(channelNotification.receive()).let {
|
||||
it.players shouldContain player
|
||||
}
|
||||
}
|
||||
GlobalScope.launch {
|
||||
commandHandler.handle(player, channelCommand, channelNotification)
|
||||
}
|
||||
})
|
||||
|
||||
channelCommand.send(IWantToJoinTheGameCommand(IWantToJoinTheGameCommand.Payload(gameId, player)))
|
||||
assertIs<WelcomeToTheGameNotification>(channelNotification.receive()).let {
|
||||
it.players shouldContain player
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,6 +3,6 @@ package eventDemo.app.command
|
||||
import io.kotest.core.spec.style.FunSpec
|
||||
|
||||
class GameCommandRunnerTest :
|
||||
FunSpec({
|
||||
test("run should run the correct command") { }
|
||||
})
|
||||
FunSpec({
|
||||
test("run should run the correct command") { }
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ package eventDemo.app.command.command
|
||||
import io.kotest.core.spec.style.FunSpec
|
||||
|
||||
class ICantPlayCommandTest :
|
||||
FunSpec({
|
||||
FunSpec({
|
||||
|
||||
xtest("run should publish the event") { }
|
||||
})
|
||||
xtest("run should publish the event") { }
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ package eventDemo.app.command.command
|
||||
import io.kotest.core.spec.style.FunSpec
|
||||
|
||||
class IWantToJoinTheGameCommandTest :
|
||||
FunSpec({
|
||||
FunSpec({
|
||||
|
||||
xtest("run should publish the event") { }
|
||||
})
|
||||
xtest("run should publish the event") { }
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ package eventDemo.app.command.command
|
||||
import io.kotest.core.spec.style.FunSpec
|
||||
|
||||
class IWantToPlayCardCommandTest :
|
||||
FunSpec({
|
||||
FunSpec({
|
||||
|
||||
xtest("run should publish the event") { }
|
||||
})
|
||||
xtest("run should publish the event") { }
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ package eventDemo.app.command.command
|
||||
import io.kotest.core.spec.style.FunSpec
|
||||
|
||||
class IamReadyToPlayCommandTest :
|
||||
FunSpec({
|
||||
FunSpec({
|
||||
|
||||
xtest("run should publish the event") { }
|
||||
})
|
||||
xtest("run should publish the event") { }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user