fase(6): fuzzing module complete
This commit is contained in:
18
dist/modules/fuzzing/domain/value-objects/FuzzIntensity.js
vendored
Normal file
18
dist/modules/fuzzing/domain/value-objects/FuzzIntensity.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FuzzIntensity = void 0;
|
||||
const ValueObject_1 = require("../../../../shared/domain/ValueObject");
|
||||
class FuzzIntensity extends ValueObject_1.ValueObject {
|
||||
static low() { return new FuzzIntensity({ value: 'low' }); }
|
||||
static medium() { return new FuzzIntensity({ value: 'medium' }); }
|
||||
static high() { return new FuzzIntensity({ value: 'high' }); }
|
||||
static fromString(s) {
|
||||
if (!FuzzIntensity.LEVELS.includes(s)) {
|
||||
throw new Error(`Invalid intensity: ${s}. Must be one of: ${FuzzIntensity.LEVELS.join(', ')}`);
|
||||
}
|
||||
return new FuzzIntensity({ value: s });
|
||||
}
|
||||
get value() { return this.props.value; }
|
||||
}
|
||||
exports.FuzzIntensity = FuzzIntensity;
|
||||
FuzzIntensity.LEVELS = ['low', 'medium', 'high'];
|
||||
Reference in New Issue
Block a user