Repository navigation
Release v4.1.0
Specs for events, read models and reactors can now state one behavior in the shape of a Specification, the Elixir counterpart of the C# scenario family.
Added
Cratis.Chronicle.Testing.EventScenario: given events, append once, then oneshould_*expectation per test (should_have_constraint_violation,should_have_concurrency_violation,should_have_appended,should_have_appended_exactly,should_have_tail_sequence_number, ...). Only what the append (and the reactors it triggered) added counts, not the given events.Cratis.Chronicle.Testing.ReadModelScenario:should_have_read_modelfor a read model built by a projection (evaluated in memory) or by a reducer, asked for by module and key, matched by struct, sub-map or predicate.Cratis.Chronicle.Testing.ReactorScenario: the events a reactor produced andshould_have_observer_failuresfor a reactor that is expected to fail.- The kernel starts once per spec module (
lifecycle: :shared, the default) or once per test (lifecycle: :per_test). - Specs in
for_*/when_*folders with no_testsuffix: this project'smix.exsshows thetest_load_filtersthat finds them.
Fixed
- The in-memory kernel answered a constraint violation when appending several events with the response type of a single append, which could not be encoded, so
EventLog.append_many/3raised instead of returning the violation.