use of org.mifos.accounts.productdefinition.exceptions.ProductDefinitionException in project head by mifos.
the class LoanOfferingBOIntegrationTest method testMinInstallmentsGreaterThanMaxInstallments.
@Test
public void testMinInstallmentsGreaterThanMaxInstallments() {
createIntitalObjects();
Date startDate = offSetCurrentDate(0);
Date endDate = offSetCurrentDate(2);
try {
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) 31, (short) 21, false, false, false, null, null, null, frequency, principalglCodeEntity, intglCodeEntity, waiverInterest);
Assert.fail();
} catch (ProductDefinitionException e) {
}
}
use of org.mifos.accounts.productdefinition.exceptions.ProductDefinitionException in project head by mifos.
the class LoanOfferingBOIntegrationTest method testBuildloanOfferingWithoutName.
@Test
public void testBuildloanOfferingWithoutName() throws SystemException, ApplicationException {
createIntitalObjects();
try {
new LoanOfferingBO(TestObjectFactory.getContext(), null, "S", productCategory, prdApplicableMaster, new Date(System.currentTimeMillis()), interestTypes, new Money(getCurrency(), "1000"), new Money(getCurrency(), "3000"), 12.0, 2.0, 3.0, (short) 20, (short) 1, (short) 12, false, false, false, frequency, principalglCodeEntity, intglCodeEntity, waiverInterest);
Assert.fail();
} catch (ProductDefinitionException e) {
}
}
use of org.mifos.accounts.productdefinition.exceptions.ProductDefinitionException in project head by mifos.
the class LoanOfferingBOIntegrationTest method testUpdateFeeNotMatchingFrequencyOfLoanOffering.
@Test
public void testUpdateFeeNotMatchingFrequencyOfLoanOffering() throws ProductDefinitionException, FeeException {
createIntitalObjects();
GracePeriodTypeEntity gracePeriodType = new GracePeriodTypeEntity(GraceType.NONE);
Date startDate = offSetCurrentDate(0);
Date endDate = offSetCurrentDate(2);
FeeBO fee = new AmountFeeBO(TestObjectFactory.getContext(), "Loan Periodic", new CategoryTypeEntity(FeeCategory.LOAN), new FeeFrequencyTypeEntity(FeeFrequencyType.PERIODIC), intglCodeEntity, new Money(getCurrency(), "100"), false, TestObjectFactory.createMeeting(TestObjectFactory.getNewMeeting(MONTHLY, EVERY_MONTH, CUSTOMER_MEETING, MONDAY)));
List<FeeBO> fees = new ArrayList<FeeBO>();
fees.add(fee);
product = createLoanOfferingBO("Loan Product", "LOAP");
try {
product.update((short) 1, "Loan Product", "LOAN", productCategory, prdApplicableMaster, startDate, endDate, "Loan Product updated", PrdStatus.LOAN_ACTIVE, gracePeriodType, interestTypes, (short) 0, new Money(getCurrency(), "3000"), new Money(getCurrency(), "1000"), new Money(getCurrency(), "1000"), 12.0, 2.0, 12.0, (short) 12, (short) 1, (short) 2, false, true, false, null, fees, null, (short) 2, RecurrenceType.WEEKLY, waiverInterest);
Assert.fail();
} catch (ProductDefinitionException e) {
}
}
use of org.mifos.accounts.productdefinition.exceptions.ProductDefinitionException in project head by mifos.
the class LoanOfferingBOIntegrationTest method testUpdateloanOfferingWithDuplicatePrdOfferingShortName.
@Test
public void testUpdateloanOfferingWithDuplicatePrdOfferingShortName() throws SystemException, ApplicationException {
product = createLoanOfferingBO("Loan Product", "LOAP");
LoanOfferingBO loanOffering1 = createLoanOfferingBO("Loan Product1", "LOA1");
createIntitalObjects();
Date startDate = offSetCurrentDate(0);
try {
loanOffering1.update((short) 1, "Loan Product1", "LOAP", productCategory, prdApplicableMaster, startDate, null, "Loan Product updated", PrdStatus.LOAN_ACTIVE, null, interestTypes, (short) 0, new Money(getCurrency(), "3000"), new Money(getCurrency(), "1000"), new Money(getCurrency(), "2000"), 12.0, 2.0, 3.0, (short) 20, (short) 1, (short) 12, false, false, false, null, null, null, (short) 2, RecurrenceType.WEEKLY, waiverInterest);
Assert.fail();
} catch (ProductDefinitionException e) {
}
TestObjectFactory.removeObject(loanOffering1);
}
use of org.mifos.accounts.productdefinition.exceptions.ProductDefinitionException in project head by mifos.
the class LoanOfferingBOIntegrationTest method testUpdateDefInterestRateNotBetweenMinMaxRates.
@Test
public void testUpdateDefInterestRateNotBetweenMinMaxRates() {
createIntitalObjects();
Date startDate = offSetCurrentDate(0);
product = createLoanOfferingBO("Loan Product", "LOAP");
try {
product.update((short) 1, "Loan Product", "LOAN", productCategory, prdApplicableMaster, startDate, null, "Loan Product updated", PrdStatus.LOAN_ACTIVE, null, interestTypes, (short) 0, new Money(getCurrency(), "3000"), new Money(getCurrency(), "1000"), new Money(getCurrency(), "1000"), 12.0, 2.0, 13.0, (short) 20, (short) 1, (short) 12, false, false, false, null, null, null, (short) 2, RecurrenceType.WEEKLY, waiverInterest);
Assert.fail();
} catch (ProductDefinitionException e) {
}
}
Aggregations