Hi,
For integration tests what would be the best way to test that a saga has been started?
Right now I am thinking:
- Clear the
saga_entry
andassociation_value_entry
tables. - Issue the event(s) required to kick-off the saga.
- Check there is a new entry in the
saga_entry
table and thesaga_type
matches what we expect. - Check there is a new entry in the
association_value_entry
table with theassociationKey
with what is expected.
Is there a better way in doing this that anyone would recommend?
Also this way involves using the org.axonframework.modelling.saga.repository.jpa.AssociationValueEntry
and org.axonframework.modelling.saga.repository.jpa.SagaEntry
entities directly. Is this ok, or not recommended?
Do I need to do something with the TokenEntry
table as well?
Regards,
vab2048