@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
24 lines • 849 B
JavaScript
import { ensure, isDefined } from 'tiny-types';
import { CorrelationId, Description, Name } from '../model/index.js';
import { DomainEvent } from './DomainEvent.js';
/**
* @group Events
*/
export class SceneBackgroundDetected extends DomainEvent {
sceneId;
name;
description;
static fromJSON(o) {
return new SceneBackgroundDetected(CorrelationId.fromJSON(o.sceneId), Name.fromJSON(o.name), Description.fromJSON(o.description));
}
constructor(sceneId, name, description, timestamp) {
super(timestamp);
this.sceneId = sceneId;
this.name = name;
this.description = description;
ensure('sceneId', sceneId, isDefined());
ensure('name', name, isDefined());
ensure('description', description, isDefined());
}
}
//# sourceMappingURL=SceneBackgroundDetected.js.map