@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
28 lines • 993 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActivityDetails = void 0;
const tiny_types_1 = require("tiny-types");
const FileSystemLocation_1 = require("../io/FileSystemLocation");
const Name_1 = require("./Name");
class ActivityDetails extends tiny_types_1.TinyType {
name;
location;
static fromJSON(o) {
return new ActivityDetails(Name_1.Name.fromJSON(o.name), FileSystemLocation_1.FileSystemLocation.fromJSON(o.location));
}
constructor(name, location) {
super();
this.name = name;
this.location = location;
(0, tiny_types_1.ensure)('name', name, (0, tiny_types_1.isDefined)());
(0, tiny_types_1.ensure)('location', location, (0, tiny_types_1.isDefined)());
}
toJSON() {
return {
name: this.name.value,
location: this.location.toJSON(),
};
}
}
exports.ActivityDetails = ActivityDetails;
//# sourceMappingURL=ActivityDetails.js.map
;