@Test public void testEvaluate() { GuaranteeTermEvaluationResult result = evaluator.evaluate(contract, term, allMetrics, now); assertEquals(3, result.getViolations().size()); }
public GuaranteeTermEvaluationResult evaluate( IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) { checkInitialized(); logger.debug("evaluate(agreement={}, term={}, now={})", agreement.getAgreementId(), term.getKpiName(), now); final List<IViolation> violations = serviceLevelEval.evaluate(agreement, term, metrics, now); logger.debug("Found " + violations.size() + " violations"); final List<? extends ICompensation> compensations = businessEval.evaluate(agreement, term, violations, now); logger.debug("Found " + compensations.size() + " compensations"); GuaranteeTermEvaluationResult result = new GuaranteeTermEvaluationResult(violations, compensations); return result; }
GuaranteeTermEvaluator { public GuaranteeTermEvaluationResult evaluate( IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) { checkInitialized(); logger.debug("evaluate(agreement={}, term={}, now={})", agreement.getAgreementId(), term.getKpiName(), now); final List<IViolation> violations = serviceLevelEval.evaluate(agreement, term, metrics, now); logger.debug("Found " + violations.size() + " violations"); final List<? extends ICompensation> compensations = businessEval.evaluate(agreement, term, violations, now); logger.debug("Found " + compensations.size() + " compensations"); GuaranteeTermEvaluationResult result = new GuaranteeTermEvaluationResult(violations, compensations); return result; } }
GuaranteeTermEvaluator { public GuaranteeTermEvaluationResult evaluate( IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) { checkInitialized(); logger.debug("evaluate(agreement={}, term={}, now={})", agreement.getAgreementId(), term.getKpiName(), now); final List<IViolation> violations = serviceLevelEval.evaluate(agreement, term, metrics, now); logger.debug("Found " + violations.size() + " violations"); final List<? extends ICompensation> compensations = businessEval.evaluate(agreement, term, violations, now); logger.debug("Found " + compensations.size() + " compensations"); GuaranteeTermEvaluationResult result = new GuaranteeTermEvaluationResult(violations, compensations); return result; } GuaranteeTermEvaluator(); }
GuaranteeTermEvaluator { public GuaranteeTermEvaluationResult evaluate( IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) { checkInitialized(); logger.debug("evaluate(agreement={}, term={}, now={})", agreement.getAgreementId(), term.getKpiName(), now); final List<IViolation> violations = serviceLevelEval.evaluate(agreement, term, metrics, now); logger.debug("Found " + violations.size() + " violations"); final List<? extends ICompensation> compensations = businessEval.evaluate(agreement, term, violations, now); logger.debug("Found " + compensations.size() + " compensations"); GuaranteeTermEvaluationResult result = new GuaranteeTermEvaluationResult(violations, compensations); return result; } GuaranteeTermEvaluator(); GuaranteeTermEvaluationResult evaluate(
            IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now); GuaranteeTermEvaluationResult evaluateBusiness(
            IAgreement agreement, IGuaranteeTerm term, List<IViolation> violations, Date now); IServiceLevelEvaluator getServiceLevelEvaluator(); void setServiceLevelEvaluator(IServiceLevelEvaluator serviceLevelEval); IBusinessValuesEvaluator getBusinessEvaluator(); void setBusinessEvaluator(IBusinessValuesEvaluator businessEval); }
GuaranteeTermEvaluator { public GuaranteeTermEvaluationResult evaluate( IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) { checkInitialized(); logger.debug("evaluate(agreement={}, term={}, now={})", agreement.getAgreementId(), term.getKpiName(), now); final List<IViolation> violations = serviceLevelEval.evaluate(agreement, term, metrics, now); logger.debug("Found " + violations.size() + " violations"); final List<? extends ICompensation> compensations = businessEval.evaluate(agreement, term, violations, now); logger.debug("Found " + compensations.size() + " compensations"); GuaranteeTermEvaluationResult result = new GuaranteeTermEvaluationResult(violations, compensations); return result; } GuaranteeTermEvaluator(); GuaranteeTermEvaluationResult evaluate(
            IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now); GuaranteeTermEvaluationResult evaluateBusiness(
            IAgreement agreement, IGuaranteeTerm term, List<IViolation> violations, Date now); IServiceLevelEvaluator getServiceLevelEvaluator(); void setServiceLevelEvaluator(IServiceLevelEvaluator serviceLevelEval); IBusinessValuesEvaluator getBusinessEvaluator(); void setBusinessEvaluator(IBusinessValuesEvaluator businessEval);  }