extract projection snapshot logic
implement GameStateRepositoryTest
add lambda to the GameEventHandler.handle{} to set the version
add VersionBuilder
add version to the events
add creation date to the events
rename gameId to aggregateId
add EventHandler interface
This commit is contained in:
@@ -34,11 +34,11 @@ class EventStreamInMemory<E : Event<ID>, ID : AggregateId> : EventStream<E, ID>
|
||||
): R? =
|
||||
events
|
||||
.filterIsInstance(eventType.java)
|
||||
.lastOrNull { it.gameId == aggregateId }
|
||||
.lastOrNull { it.aggregateId == aggregateId }
|
||||
|
||||
override fun readAll(aggregateId: ID): Set<E> =
|
||||
events
|
||||
.filter { it.gameId == aggregateId }
|
||||
.filter { it.aggregateId == aggregateId }
|
||||
.toSet()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user