@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 • 747 B
JavaScript
import { ensure, isDefined, TinyType } from 'tiny-types';
import { FileSystemLocation } from '../io/FileSystemLocation.js';
import { Name } from './Name.js';
export class ActivityDetails extends TinyType {
name;
location;
static fromJSON(o) {
return new ActivityDetails(Name.fromJSON(o.name), FileSystemLocation.fromJSON(o.location));
}
constructor(name, location) {
super();
this.name = name;
this.location = location;
ensure('name', name, isDefined());
ensure('location', location, isDefined());
}
toJSON() {
return {
name: this.name.value,
location: this.location.toJSON(),
};
}
}
//# sourceMappingURL=ActivityDetails.js.map