Search in sources :

Example 16 with InterestTypesEntity

use of org.mifos.application.master.business.InterestTypesEntity in project head by mifos.

the class LoanOfferingBOIntegrationTest method testLoanOfferingWithDecliningInterestNoDeductionAtDisbursement.

@Test
public void testLoanOfferingWithDecliningInterestNoDeductionAtDisbursement() throws Exception {
    createIntitalObjects();
    interestTypes = new InterestTypesEntity(InterestType.DECLINING);
    Date startDate = offSetCurrentDate(0);
    Date endDate = offSetCurrentDate(2);
    LoanOfferingBO loanOffering = new LoanOfferingBO(TestObjectFactory.getContext(), "Loan Offering", "LOAP", productCategory, prdApplicableMaster, startDate, endDate, null, null, null, interestTypes, new Money(getCurrency(), "1000"), new Money(getCurrency(), "3000"), new Money(getCurrency(), "2000.0"), 12.0, 2.0, 3.0, (short) 20, (short) 11, (short) 17, false, false, false, null, null, null, frequency, principalglCodeEntity, intglCodeEntity, waiverInterest);
    Assert.assertEquals(InterestType.DECLINING, loanOffering.getInterestType());
}
Also used : InterestTypesEntity(org.mifos.application.master.business.InterestTypesEntity) Money(org.mifos.framework.util.helpers.Money) Date(java.sql.Date) Test(org.junit.Test)

Aggregations

InterestTypesEntity (org.mifos.application.master.business.InterestTypesEntity)16 ArrayList (java.util.ArrayList)9 GracePeriodTypeEntity (org.mifos.accounts.productdefinition.business.GracePeriodTypeEntity)7 Test (org.junit.Test)6 GLCodeEntity (org.mifos.accounts.financial.business.GLCodeEntity)6 LoanOfferingBO (org.mifos.accounts.productdefinition.business.LoanOfferingBO)6 PrdApplicableMasterEntity (org.mifos.accounts.productdefinition.business.PrdApplicableMasterEntity)6 ProductCategoryBO (org.mifos.accounts.productdefinition.business.ProductCategoryBO)6 MifosRuntimeException (org.mifos.core.MifosRuntimeException)6 PrdStatusEntity (org.mifos.accounts.productdefinition.business.PrdStatusEntity)5 ProductDefinitionException (org.mifos.accounts.productdefinition.exceptions.ProductDefinitionException)5 Money (org.mifos.framework.util.helpers.Money)5 Date (java.sql.Date)4 FeeBO (org.mifos.accounts.fees.business.FeeBO)4 FundBO (org.mifos.accounts.fund.business.FundBO)4 AmountFeeBO (org.mifos.accounts.fees.business.AmountFeeBO)3 MifosCurrency (org.mifos.application.master.business.MifosCurrency)3 MeetingBO (org.mifos.application.meeting.business.MeetingBO)3 PersistenceException (org.mifos.framework.exceptions.PersistenceException)3 BigDecimal (java.math.BigDecimal)2