UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

25 lines 911 B
import { ensure, isDefined } from 'tiny-types'; import { CorrelationId, Outcome, ScenarioDetails } from '../model/index.js'; import { Timestamp } from '../screenplay/index.js'; import { DomainEvent } from './DomainEvent.js'; /** * @group Events */ export class SceneFinished extends DomainEvent { sceneId; details; outcome; static fromJSON(o) { return new SceneFinished(CorrelationId.fromJSON(o.sceneId), ScenarioDetails.fromJSON(o.details), Outcome.fromJSON(o.outcome), Timestamp.fromJSON(o.timestamp)); } constructor(sceneId, details, outcome, timestamp) { super(timestamp); this.sceneId = sceneId; this.details = details; this.outcome = outcome; ensure('sceneId', sceneId, isDefined()); ensure('details', details, isDefined()); ensure('outcome', outcome, isDefined()); } } //# sourceMappingURL=SceneFinished.js.map