diff --git a/src/main/kotlin/eventDemo/adapter/infrastructureLayer/event/projection/GameStateRepository.kt b/src/main/kotlin/eventDemo/adapter/infrastructureLayer/event/projection/GameStateRepositoryInMemory.kt similarity index 88% rename from src/main/kotlin/eventDemo/adapter/infrastructureLayer/event/projection/GameStateRepository.kt rename to src/main/kotlin/eventDemo/adapter/infrastructureLayer/event/projection/GameStateRepositoryInMemory.kt index 5d9b57b..704f9d5 100644 --- a/src/main/kotlin/eventDemo/adapter/infrastructureLayer/event/projection/GameStateRepository.kt +++ b/src/main/kotlin/eventDemo/adapter/infrastructureLayer/event/projection/GameStateRepositoryInMemory.kt @@ -4,9 +4,9 @@ import eventDemo.business.entity.GameId import eventDemo.business.event.GameEventHandler import eventDemo.business.event.GameEventStore import eventDemo.business.event.event.GameEvent -import eventDemo.business.event.projection.GameState -import eventDemo.business.event.projection.GameStateRepository -import eventDemo.business.event.projection.apply +import eventDemo.business.event.projection.gameState.GameState +import eventDemo.business.event.projection.gameState.GameStateRepository +import eventDemo.business.event.projection.gameState.apply import eventDemo.libs.event.projection.ProjectionSnapshotRepositoryInMemory import eventDemo.libs.event.projection.SnapshotConfig diff --git a/src/main/kotlin/eventDemo/adapter/interfaceLayer/ReadTheGameState.kt b/src/main/kotlin/eventDemo/adapter/interfaceLayer/ReadTheGameState.kt index 9110272..d901c4e 100644 --- a/src/main/kotlin/eventDemo/adapter/interfaceLayer/ReadTheGameState.kt +++ b/src/main/kotlin/eventDemo/adapter/interfaceLayer/ReadTheGameState.kt @@ -1,7 +1,7 @@ package eventDemo.adapter.interfaceLayer import eventDemo.business.entity.GameId -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameStateRepository import eventDemo.configuration.serializer.GameIdSerializer import io.ktor.http.HttpStatusCode import io.ktor.resources.Resource diff --git a/src/main/kotlin/eventDemo/business/command/action/ICantPlay.kt b/src/main/kotlin/eventDemo/business/command/action/ICantPlay.kt index 0d365e8..81ea640 100644 --- a/src/main/kotlin/eventDemo/business/command/action/ICantPlay.kt +++ b/src/main/kotlin/eventDemo/business/command/action/ICantPlay.kt @@ -3,7 +3,7 @@ package eventDemo.business.command.action import eventDemo.business.command.CommandException import eventDemo.business.command.command.ICantPlayCommand import eventDemo.business.event.event.PlayerHavePassEvent -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameStateRepository /** * A command to perform an action to play a new card diff --git a/src/main/kotlin/eventDemo/business/command/action/IWantToJoinTheGame.kt b/src/main/kotlin/eventDemo/business/command/action/IWantToJoinTheGame.kt index 29f5ca4..69adfb9 100644 --- a/src/main/kotlin/eventDemo/business/command/action/IWantToJoinTheGame.kt +++ b/src/main/kotlin/eventDemo/business/command/action/IWantToJoinTheGame.kt @@ -3,7 +3,7 @@ package eventDemo.business.command.action import eventDemo.business.command.CommandException import eventDemo.business.command.command.IWantToJoinTheGameCommand import eventDemo.business.event.event.NewPlayerEvent -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameStateRepository /** * A command to perform an action to play a new card diff --git a/src/main/kotlin/eventDemo/business/command/action/IWantToPlayCard.kt b/src/main/kotlin/eventDemo/business/command/action/IWantToPlayCard.kt index 6266aa7..278f30c 100644 --- a/src/main/kotlin/eventDemo/business/command/action/IWantToPlayCard.kt +++ b/src/main/kotlin/eventDemo/business/command/action/IWantToPlayCard.kt @@ -3,7 +3,7 @@ package eventDemo.business.command.action import eventDemo.business.command.CommandException import eventDemo.business.command.command.IWantToPlayCardCommand import eventDemo.business.event.event.CardIsPlayedEvent -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameStateRepository /** * A command to perform an action to play a new card diff --git a/src/main/kotlin/eventDemo/business/command/action/IamReadyToPlay.kt b/src/main/kotlin/eventDemo/business/command/action/IamReadyToPlay.kt index 0213419..21ba8a8 100644 --- a/src/main/kotlin/eventDemo/business/command/action/IamReadyToPlay.kt +++ b/src/main/kotlin/eventDemo/business/command/action/IamReadyToPlay.kt @@ -3,7 +3,7 @@ package eventDemo.business.command.action import eventDemo.business.command.CommandException import eventDemo.business.command.command.IamReadyToPlayCommand import eventDemo.business.event.event.PlayerReadyEvent -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameStateRepository /** * A command to set as ready to play diff --git a/src/main/kotlin/eventDemo/business/event/eventListener/PlayerNotificationEventListener.kt b/src/main/kotlin/eventDemo/business/event/eventListener/PlayerNotificationEventListener.kt index a0b231c..a5179af 100644 --- a/src/main/kotlin/eventDemo/business/event/eventListener/PlayerNotificationEventListener.kt +++ b/src/main/kotlin/eventDemo/business/event/eventListener/PlayerNotificationEventListener.kt @@ -12,7 +12,7 @@ import eventDemo.business.event.event.PlayerChoseColorEvent import eventDemo.business.event.event.PlayerHavePassEvent import eventDemo.business.event.event.PlayerReadyEvent import eventDemo.business.event.event.PlayerWinEvent -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameStateRepository import eventDemo.business.notification.ItsTheTurnOfNotification import eventDemo.business.notification.Notification import eventDemo.business.notification.PlayerAsJoinTheGameNotification diff --git a/src/main/kotlin/eventDemo/business/event/eventListener/ReactionEventListener.kt b/src/main/kotlin/eventDemo/business/event/eventListener/ReactionEventListener.kt index 2e54069..e7883f4 100644 --- a/src/main/kotlin/eventDemo/business/event/eventListener/ReactionEventListener.kt +++ b/src/main/kotlin/eventDemo/business/event/eventListener/ReactionEventListener.kt @@ -6,8 +6,8 @@ import eventDemo.business.event.event.GameEvent import eventDemo.business.event.event.GameStartedEvent import eventDemo.business.event.event.PlayerReadyEvent import eventDemo.business.event.event.PlayerWinEvent -import eventDemo.business.event.projection.GameState -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameState +import eventDemo.business.event.projection.gameState.GameStateRepository import io.github.oshai.kotlinlogging.KotlinLogging import io.github.oshai.kotlinlogging.withLoggingContext import java.util.concurrent.ConcurrentSkipListSet diff --git a/src/main/kotlin/eventDemo/business/event/projection/GameState.kt b/src/main/kotlin/eventDemo/business/event/projection/gameState/GameState.kt similarity index 97% rename from src/main/kotlin/eventDemo/business/event/projection/GameState.kt rename to src/main/kotlin/eventDemo/business/event/projection/gameState/GameState.kt index 650f9ca..e3e190a 100644 --- a/src/main/kotlin/eventDemo/business/event/projection/GameState.kt +++ b/src/main/kotlin/eventDemo/business/event/projection/gameState/GameState.kt @@ -1,9 +1,10 @@ -package eventDemo.business.event.projection +package eventDemo.business.event.projection.gameState import eventDemo.business.entity.Card import eventDemo.business.entity.Deck import eventDemo.business.entity.GameId import eventDemo.business.entity.Player +import eventDemo.business.event.projection.Projection import kotlinx.serialization.Serializable @Serializable diff --git a/src/main/kotlin/eventDemo/business/event/projection/GameStateBuilder.kt b/src/main/kotlin/eventDemo/business/event/projection/gameState/GameStateBuilder.kt similarity index 98% rename from src/main/kotlin/eventDemo/business/event/projection/GameStateBuilder.kt rename to src/main/kotlin/eventDemo/business/event/projection/gameState/GameStateBuilder.kt index fc1a9ca..d7f7fa2 100644 --- a/src/main/kotlin/eventDemo/business/event/projection/GameStateBuilder.kt +++ b/src/main/kotlin/eventDemo/business/event/projection/gameState/GameStateBuilder.kt @@ -1,4 +1,4 @@ -package eventDemo.business.event.projection +package eventDemo.business.event.projection.gameState import eventDemo.business.entity.Card import eventDemo.business.event.event.CardIsPlayedEvent diff --git a/src/main/kotlin/eventDemo/business/event/projection/GameStateRepository.kt b/src/main/kotlin/eventDemo/business/event/projection/gameState/GameStateRepository.kt similarity index 79% rename from src/main/kotlin/eventDemo/business/event/projection/GameStateRepository.kt rename to src/main/kotlin/eventDemo/business/event/projection/gameState/GameStateRepository.kt index 5637924..a4a522f 100644 --- a/src/main/kotlin/eventDemo/business/event/projection/GameStateRepository.kt +++ b/src/main/kotlin/eventDemo/business/event/projection/gameState/GameStateRepository.kt @@ -1,4 +1,4 @@ -package eventDemo.business.event.projection +package eventDemo.business.event.projection.gameState import eventDemo.business.entity.GameId import eventDemo.business.event.event.GameEvent diff --git a/src/main/kotlin/eventDemo/configuration/injection/ConfigureDIInfrastructure.kt b/src/main/kotlin/eventDemo/configuration/injection/ConfigureDIInfrastructure.kt index 1d7b59b..f7e615f 100644 --- a/src/main/kotlin/eventDemo/configuration/injection/ConfigureDIInfrastructure.kt +++ b/src/main/kotlin/eventDemo/configuration/injection/ConfigureDIInfrastructure.kt @@ -5,7 +5,7 @@ import eventDemo.adapter.infrastructureLayer.event.GameEventStoreInMemory import eventDemo.adapter.infrastructureLayer.event.projection.GameStateRepositoryInMemory import eventDemo.business.event.GameEventBus import eventDemo.business.event.GameEventStore -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameStateRepository import eventDemo.libs.event.projection.SnapshotConfig import org.koin.core.module.Module import org.koin.dsl.bind diff --git a/src/test/kotlin/eventDemo/app/event/projection/GameStateBuilderTest.kt b/src/test/kotlin/eventDemo/app/event/projection/GameStateBuilderTest.kt index 40b217c..02b3396 100644 --- a/src/test/kotlin/eventDemo/app/event/projection/GameStateBuilderTest.kt +++ b/src/test/kotlin/eventDemo/app/event/projection/GameStateBuilderTest.kt @@ -8,8 +8,8 @@ import eventDemo.business.event.event.GameStartedEvent import eventDemo.business.event.event.NewPlayerEvent import eventDemo.business.event.event.PlayerReadyEvent import eventDemo.business.event.event.disableShuffleDeck -import eventDemo.business.event.projection.GameState -import eventDemo.business.event.projection.apply +import eventDemo.business.event.projection.gameState.GameState +import eventDemo.business.event.projection.gameState.apply import eventDemo.libs.event.VersionBuilderLocal import io.kotest.core.spec.style.FunSpec import io.kotest.matchers.equals.shouldBeEqual diff --git a/src/test/kotlin/eventDemo/app/event/projection/GameStateRepositoryTest.kt b/src/test/kotlin/eventDemo/app/event/projection/GameStateRepositoryTest.kt index 12dbb6f..0d3b047 100644 --- a/src/test/kotlin/eventDemo/app/event/projection/GameStateRepositoryTest.kt +++ b/src/test/kotlin/eventDemo/app/event/projection/GameStateRepositoryTest.kt @@ -4,7 +4,7 @@ import eventDemo.business.entity.GameId import eventDemo.business.entity.Player import eventDemo.business.event.GameEventHandler import eventDemo.business.event.event.NewPlayerEvent -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameStateRepository import eventDemo.configuration.injection.appKoinModule import io.kotest.core.spec.style.FunSpec import io.kotest.matchers.collections.shouldHaveSize diff --git a/src/test/kotlin/eventDemo/app/event/projection/GameStateTest.kt b/src/test/kotlin/eventDemo/app/event/projection/GameStateTest.kt index ad789b4..25fa4ab 100644 --- a/src/test/kotlin/eventDemo/app/event/projection/GameStateTest.kt +++ b/src/test/kotlin/eventDemo/app/event/projection/GameStateTest.kt @@ -6,7 +6,7 @@ import eventDemo.business.entity.Discard import eventDemo.business.entity.GameId import eventDemo.business.entity.Player import eventDemo.business.entity.PlayersHands -import eventDemo.business.event.projection.GameState +import eventDemo.business.event.projection.gameState.GameState import io.kotest.core.spec.style.FunSpec import io.kotest.matchers.equals.shouldBeEqual diff --git a/src/test/kotlin/eventDemo/app/query/GameSimulationTest.kt b/src/test/kotlin/eventDemo/app/query/GameSimulationTest.kt index 85a7d7f..ff0c357 100644 --- a/src/test/kotlin/eventDemo/app/query/GameSimulationTest.kt +++ b/src/test/kotlin/eventDemo/app/query/GameSimulationTest.kt @@ -12,8 +12,8 @@ import eventDemo.business.event.GameEventStore import eventDemo.business.event.event.disableShuffleDeck import eventDemo.business.event.eventListener.PlayerNotificationEventListener import eventDemo.business.event.eventListener.ReactionEventListener -import eventDemo.business.event.projection.GameState -import eventDemo.business.event.projection.apply +import eventDemo.business.event.projection.gameState.GameState +import eventDemo.business.event.projection.gameState.apply import eventDemo.business.notification.CommandSuccessNotification import eventDemo.business.notification.ItsTheTurnOfNotification import eventDemo.business.notification.Notification diff --git a/src/test/kotlin/eventDemo/app/query/GameStateRouteTest.kt b/src/test/kotlin/eventDemo/app/query/GameStateRouteTest.kt index a73d468..40ae241 100644 --- a/src/test/kotlin/eventDemo/app/query/GameStateRouteTest.kt +++ b/src/test/kotlin/eventDemo/app/query/GameStateRouteTest.kt @@ -8,8 +8,8 @@ import eventDemo.business.event.event.CardIsPlayedEvent import eventDemo.business.event.event.GameStartedEvent import eventDemo.business.event.event.NewPlayerEvent import eventDemo.business.event.event.PlayerReadyEvent -import eventDemo.business.event.projection.GameState -import eventDemo.business.event.projection.GameStateRepository +import eventDemo.business.event.projection.gameState.GameState +import eventDemo.business.event.projection.gameState.GameStateRepository import eventDemo.configuration.configure import eventDemo.configuration.ktor.makeJwt import io.kotest.core.spec.style.FunSpec