Fix tests

This commit is contained in:
Paul-Henri Froidmont 2025-11-04 14:03:20 +01:00
parent aa9d60e4d1
commit 96b3b77b79
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
3 changed files with 13 additions and 3 deletions

View file

@ -126,7 +126,7 @@ class TerminateHandler()
ContractState
]:
val name = "reject"
val name = "terminate"
def onCommand(entityId: String, state: ContractState, command: ContractCommand.Terminate)
: Task[ContractEvent.Terminated] =

View file

@ -28,7 +28,14 @@ object ContractState:
extends ContractState derives Schema:
def amend(e: ContractEvent.Amended) =
Actif(e.product, holder, e.vehicle, e.formula, e.premium)
PendingAmendment(
product,
holder,
vehicle,
formula,
premium,
PendingChanges(e.product, e.vehicle, e.formula, e.premium)
)
def terminate() =
Terminated(product, holder, vehicle, formula, premium)