Goal: Store an XML file of the existing structure of an aggregate snapshot, and then use that XML in a unit test. The goal here would be to assert that any changes to a snapshotted aggregate are backwards compatible and do not produce unexpected errors when deploying to existing environment. Would be nice to detect these issues at build-time.
Attempts: I’ve tried to use the .givenState() method, but that does not appear to work for event-sourced aggregates. I get the following error message
No ‘given’ events were configured for this aggregate, nor have any events been stored.
Is this possible?