arch-unit-ts
Version:
30 lines • 843 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ViolatedAndSatisfiedConditionEvents = void 0;
class ViolatedAndSatisfiedConditionEvents {
allowedEvents;
violatingEvents;
constructor() {
this.allowedEvents = [];
this.violatingEvents = [];
}
add(event) {
if (event.isViolation()) {
this.violatingEvents.push(event);
}
else {
this.allowedEvents.push(event);
}
}
getViolating() {
return this.violatingEvents;
}
getAllowed() {
return this.allowedEvents;
}
containViolation() {
return this.violatingEvents.length > 0;
}
}
exports.ViolatedAndSatisfiedConditionEvents = ViolatedAndSatisfiedConditionEvents;
//# sourceMappingURL=ViolatedAndSatisfiedConditionEvents.js.map