fase(6): fuzzing module complete
This commit is contained in:
19
dist/modules/fuzzing/infrastructure/strategies/BoundaryValueStrategy.js
vendored
Normal file
19
dist/modules/fuzzing/infrastructure/strategies/BoundaryValueStrategy.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.BoundaryValueStrategy = void 0;
|
||||
class BoundaryValueStrategy {
|
||||
constructor() {
|
||||
this.name = 'BoundaryValueStrategy';
|
||||
}
|
||||
appliesTo(type) {
|
||||
return type === 'number' || type === 'date';
|
||||
}
|
||||
values(type) {
|
||||
switch (type) {
|
||||
case 'number': return ['0', '-1', '2147483647', '2147483648', '-2147483648'];
|
||||
case 'date': return ['1900-01-01', '2099-12-31', '1970-01-01'];
|
||||
default: return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.BoundaryValueStrategy = BoundaryValueStrategy;
|
||||
Reference in New Issue
Block a user