UNPKG

@serenity-js/core

Version:

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

18 lines 604 B
import { ensure, isDefined, TinyType } from 'tiny-types'; import { Description } from './Description.js'; import { Name } from './Name.js'; export class BusinessRule extends TinyType { name; description; static fromJSON(o) { return new BusinessRule(Name.fromJSON(o.name), Description.fromJSON(o.description)); } constructor(name, description) { super(); this.name = name; this.description = description; ensure('name', name, isDefined()); ensure('description', description, isDefined()); } } //# sourceMappingURL=BusinessRule.js.map