// Copyright (c) Cratis. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. import type { AppendOptions } from '../eventSequences/AppendOptions.js'; import type { ReadModelScenario } from './ReadModelScenario.js'; /** Seeds events belonging to one event source, in the order provided. */ export class ReadModelScenarioGiven { /** Creates a builder for the selected event source. */ constructor(private readonly _scenario: ReadModelScenario, private readonly _eventSourceId: string, private readonly _options?: AppendOptions) {} /** Adds events to the scenario without connecting to a Chronicle kernel. */ events(...events: object[]): ReadModelScenario { this._scenario.collectEventsFor(this._eventSourceId, events, this._options); return this._scenario; } }