UNPKG

@serenity-js/core

Version:

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

22 lines 823 B
import { ensure, isDefined } from 'tiny-types'; import { CorrelationId, Description } from '../model/index.js'; import { Timestamp } from '../screenplay/index.js'; import { DomainEvent } from './DomainEvent.js'; /** * @group Events */ export class SceneDescriptionDetected extends DomainEvent { sceneId; description; static fromJSON(o) { return new SceneDescriptionDetected(CorrelationId.fromJSON(o.sceneId), Description.fromJSON(o.description), Timestamp.fromJSON(o.timestamp)); } constructor(sceneId, description, timestamp) { super(timestamp); this.sceneId = sceneId; this.description = description; ensure('sceneId', sceneId, isDefined()); ensure('description', description, isDefined()); } } //# sourceMappingURL=SceneDescriptionDetected.js.map