use of org.mifos.accounts.loan.schedule.domain.InstallmentBuilder in project head by mifos.
the class ScheduleMapperTest method getSchedule.
public Schedule getSchedule() {
Installment installment1 = new InstallmentBuilder("1").withDueDate(getDate(23, 10, 2010)).withPrincipal(100).withPrincipalPaid(100).withInterest(10).withInterestPaid(10).withExtraInterest(9).withExtraInterestPaid(9).withMiscFees(8).withMiscFeesPaid(8).withPenalty(7).withPenaltyPaid(7).withMiscPenalty(6).withMiscPenaltyPaid(6).withFees(5).withFeesPaid(5).build();
Installment installment2 = new InstallmentBuilder("2").withDueDate(getDate(23, 11, 2010)).withPrincipal(1000).withPrincipalPaid(100).withInterest(100).withInterestPaid(10).withExtraInterest(90).withExtraInterestPaid(9).withMiscFees(80).withMiscFeesPaid(8).withPenalty(70).withPenaltyPaid(7).withMiscPenalty(60).withMiscPenaltyPaid(6).withFees(50).withFeesPaid(5).build();
Installment installment3 = new InstallmentBuilder("3").withDueDate(getDate(23, 12, 2010)).withPrincipal(1000).withPrincipalPaid(0).withInterest(100).withInterestPaid(0).withExtraInterest(90).withExtraInterestPaid(0).withMiscFees(80).withMiscFeesPaid(0).withPenalty(70).withPenaltyPaid(0).withMiscPenalty(60).withMiscPenaltyPaid(0).withFees(50).withFeesPaid(0).build();
List<Installment> installments = Arrays.asList(installment1, installment2, installment3);
return new Schedule(DISBURSEMENT_DATE, DAILY_INTEREST_RATE, LOAN_AMOUNT, installments);
}
use of org.mifos.accounts.loan.schedule.domain.InstallmentBuilder in project head by mifos.
the class ScheduleMapperTest method getInstallments.
private List<Installment> getInstallments(double... extraInterest) {
Installment installment1 = new InstallmentBuilder("1").withDueDate(getDate(23, 10, 2010)).withPrincipal(100).withInterest(10).withExtraInterest(extraInterest[0]).build();
Installment installment2 = new InstallmentBuilder("2").withDueDate(getDate(23, 10, 2010)).withPrincipal(100).withInterest(10).withExtraInterest(extraInterest[1]).build();
Installment installment3 = new InstallmentBuilder("3").withDueDate(getDate(23, 12, 2010)).withPrincipal(100).withInterest(10).withExtraInterest(extraInterest[2]).build();
return asList(installment1, installment2, installment3);
}
Aggregations