@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
29 lines • 1.26 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.AsyncOperationAttempted = void 0;
const tiny_types_1 = require("tiny-types");
const model_1 = require("../model");
const screenplay_1 = require("../screenplay");
const DomainEvent_1 = require("./DomainEvent");
/**
* @group Events
*/
class AsyncOperationAttempted extends DomainEvent_1.DomainEvent {
name;
description;
correlationId;
static fromJSON(o) {
return new AsyncOperationAttempted(model_1.Name.fromJSON(o.name), model_1.Description.fromJSON(o.description), model_1.CorrelationId.fromJSON(o.correlationId), screenplay_1.Timestamp.fromJSON(o.timestamp));
}
constructor(name, description, correlationId, timestamp) {
super(timestamp);
this.name = name;
this.description = description;
this.correlationId = correlationId;
(0, tiny_types_1.ensure)('name', name, (0, tiny_types_1.isDefined)());
(0, tiny_types_1.ensure)('description', description, (0, tiny_types_1.isDefined)());
(0, tiny_types_1.ensure)('correlationId', correlationId, (0, tiny_types_1.isDefined)());
}
}
exports.AsyncOperationAttempted = AsyncOperationAttempted;
//# sourceMappingURL=AsyncOperationAttempted.js.map
;