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 976 B
import { ensure, isDefined } from 'tiny-types'; import { CorrelationId, Description, Name } from '../model/index.js'; import { Timestamp } from '../screenplay/index.js'; import { DomainEvent } from './DomainEvent.js'; /** * @group Events */ export class AsyncOperationAttempted extends DomainEvent { name; description; correlationId; static fromJSON(o) { return new AsyncOperationAttempted(Name.fromJSON(o.name), Description.fromJSON(o.description), CorrelationId.fromJSON(o.correlationId), Timestamp.fromJSON(o.timestamp)); } constructor(name, description, correlationId, timestamp) { super(timestamp); this.name = name; this.description = description; this.correlationId = correlationId; ensure('name', name, isDefined()); ensure('description', description, isDefined()); ensure('correlationId', correlationId, isDefined()); } } //# sourceMappingURL=AsyncOperationAttempted.js.map