@Test public void testGetAgreementStatus() { testStatus(FULFILLED, FULFILLED); testStatus(NON_DETERMINED); testStatus(NON_DETERMINED, FULFILLED, NON_DETERMINED); testStatus(NON_DETERMINED, NON_DETERMINED, FULFILLED); testStatus(VIOLATED, FULFILLED, VIOLATED); testStatus(VIOLATED, NON_DETERMINED, VIOLATED); testStatus(VIOLATED, VIOLATED, NON_DETERMINED); testStatus(VIOLATED, VIOLATED, NON_DETERMINED, FULFILLED); }
public GuaranteeTermsStatus getAgreementStatus(String id) throws DBMissingHelperException{ logger.debug("StartOf getAgreementStatus id:{}", id); IAgreement agreement = agreementDAO.getByAgreementId(id); if (agreement == null) throw new DBMissingHelperException("The agreementId " + id + " doesn't exist"); List<IGuaranteeTerm> guaranteeTerms = agreement.getGuaranteeTerms(); GuaranteeTermsStatus guaranteeTermsStatus = getGuaranteeStatus(id, guaranteeTerms); logger.debug("EndOf getAgreementStatus"); return guaranteeTermsStatus; }
AgreementHelperE { public GuaranteeTermsStatus getAgreementStatus(String id) throws DBMissingHelperException{ logger.debug("StartOf getAgreementStatus id:{}", id); IAgreement agreement = agreementDAO.getByAgreementId(id); if (agreement == null) throw new DBMissingHelperException("The agreementId " + id + " doesn't exist"); List<IGuaranteeTerm> guaranteeTerms = agreement.getGuaranteeTerms(); GuaranteeTermsStatus guaranteeTermsStatus = getGuaranteeStatus(id, guaranteeTerms); logger.debug("EndOf getAgreementStatus"); return guaranteeTermsStatus; } }
AgreementHelperE { public GuaranteeTermsStatus getAgreementStatus(String id) throws DBMissingHelperException{ logger.debug("StartOf getAgreementStatus id:{}", id); IAgreement agreement = agreementDAO.getByAgreementId(id); if (agreement == null) throw new DBMissingHelperException("The agreementId " + id + " doesn't exist"); List<IGuaranteeTerm> guaranteeTerms = agreement.getGuaranteeTerms(); GuaranteeTermsStatus guaranteeTermsStatus = getGuaranteeStatus(id, guaranteeTerms); logger.debug("EndOf getAgreementStatus"); return guaranteeTermsStatus; } AgreementHelperE(); }
AgreementHelperE { public GuaranteeTermsStatus getAgreementStatus(String id) throws DBMissingHelperException{ logger.debug("StartOf getAgreementStatus id:{}", id); IAgreement agreement = agreementDAO.getByAgreementId(id); if (agreement == null) throw new DBMissingHelperException("The agreementId " + id + " doesn't exist"); List<IGuaranteeTerm> guaranteeTerms = agreement.getGuaranteeTerms(); GuaranteeTermsStatus guaranteeTermsStatus = getGuaranteeStatus(id, guaranteeTerms); logger.debug("EndOf getAgreementStatus"); return guaranteeTermsStatus; } AgreementHelperE(); String createAgreement(Agreement agreementXML, String originalSerializedAgreement); String createAgreement(Agreement agreementXML, String originalSerializedAgreement, String agreementId); List<IAgreement> getAgreements(String consumerId, String providerId, String templateId, Boolean active); IAgreement getAgreementByID(String id); Context getAgreementContextByID(String id); List<IAgreement> getActiveAgreements(long actualDate); boolean deleteByAgreementId(String agreementId); GuaranteeTermsStatus getAgreementStatus(String id); List<IAgreement> getAgreementsPerTemplateAndConsumer(String consumerId, String templateUUID); }
AgreementHelperE { public GuaranteeTermsStatus getAgreementStatus(String id) throws DBMissingHelperException{ logger.debug("StartOf getAgreementStatus id:{}", id); IAgreement agreement = agreementDAO.getByAgreementId(id); if (agreement == null) throw new DBMissingHelperException("The agreementId " + id + " doesn't exist"); List<IGuaranteeTerm> guaranteeTerms = agreement.getGuaranteeTerms(); GuaranteeTermsStatus guaranteeTermsStatus = getGuaranteeStatus(id, guaranteeTerms); logger.debug("EndOf getAgreementStatus"); return guaranteeTermsStatus; } AgreementHelperE(); String createAgreement(Agreement agreementXML, String originalSerializedAgreement); String createAgreement(Agreement agreementXML, String originalSerializedAgreement, String agreementId); List<IAgreement> getAgreements(String consumerId, String providerId, String templateId, Boolean active); IAgreement getAgreementByID(String id); Context getAgreementContextByID(String id); List<IAgreement> getActiveAgreements(long actualDate); boolean deleteByAgreementId(String agreementId); GuaranteeTermsStatus getAgreementStatus(String id); List<IAgreement> getAgreementsPerTemplateAndConsumer(String consumerId, String templateUUID);  }