You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
ReactorScenario can seed events on a route: Given.ForEventSource(id).OnStream(eventSourceType, eventStreamType, eventStreamId).Events(...). The reactor sees the route in EventContext.EventSourceType, EventStreamType and EventStreamId. Every argument is optional and defaults to what appending to the event log uses. The same OnStream is available on reactors registered fluently (#4760)
A new ProducedEvents list on ReactorScenario records every event a reactor produces together with its destination (event source id, event source type, event stream type and event stream id), resolved the same way a running reactor appends it. Assert it with ShouldHaveProduced<TEvent>(eventSourceId) or ShouldHaveProduced<TEvent>((produced, @event) => ...). See Asserting produced destinations
Changed
In ReactorScenario, a reactor that declares [EventSourceType], [EventStreamType] or [FromEventSource<TSource>(stream)] now handles only the given events that match its filter, as it would against a running kernel. A filtered reactor no longer handles events given without OnStream unless the default route matches its filter. Give those events with OnStream on the route the reactor listens to. Tag filters are not applied in the scenario