use of org.junit.Ignore in project head by mifos.
the class CollectionSheetDaoHibernateIntegrationTest method testShouldFindAccountCollectionFeesForCustomerAccounts.
@Test
@Ignore
public void testShouldFindAccountCollectionFeesForCustomerAccounts() {
// setup
final Short branchId = center.getOffice().getOfficeId();
final String searchId = center.getSearchId() + ".%";
final LocalDate transactionDate = new LocalDate();
// exercise test
Map<Integer, List<CollectionSheetCustomerAccountCollectionDto>> allCustomerAccountCollectionFees = collectionSheetDao.findAccountCollectionsOnCustomerAccount(branchId, searchId, transactionDate, center.getCustomerId());
// verification
Assert.assertNotNull(allCustomerAccountCollectionFees);
final List<CollectionSheetCustomerAccountCollectionDto> accountCollections = allCustomerAccountCollectionFees.get(group.getCustomerId());
Assert.assertNotNull(accountCollections);
Assert.assertThat(accountCollections.size(), is(1));
Assert.assertThat(accountCollections.get(0).getAccountId(), is(group.getCustomerAccount().getAccountId()));
Assert.assertThat(accountCollections.get(0).getCustomerId(), is(group.getCustomerId()));
Assert.assertThat(accountCollections.get(0).getMiscFeesDue(), is(new BigDecimal("0.0000")));
Assert.assertThat(accountCollections.get(0).getMiscFeesPaid(), is(new BigDecimal("0.0000")));
Assert.assertThat(accountCollections.get(0).getAccountCollectionPayment(), is(Double.valueOf("0.0")));
}
use of org.junit.Ignore in project head by mifos.
the class EditStatusActionStrutsTest method updateSuccessForLoan.
@Ignore("Convert to unit test")
public void updateSuccessForLoan() throws Exception {
request.setAttribute(Constants.CURRENTFLOWKEY, flowKey);
// createInitialObjects();
createCenterGroupClientHierarchy();
accountBO = getLoanAccount(client, meeting, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING);
setRequestPathInfo("/editStatusAction.do");
addRequestParameter("method", "load");
addRequestParameter("input", "loan");
addRequestParameter("accountId", accountBO.getAccountId().toString());
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
actionPerform();
verifyForward("load_success");
Assert.assertNotNull(SessionUtils.getAttribute(SavingsConstants.STATUS_LIST, request));
Assert.assertEquals("Size of the status list should be 2", 2, ((List<AccountStateEntity>) SessionUtils.getAttribute(SavingsConstants.STATUS_LIST, request)).size());
setRequestPathInfo("/editStatusAction.do");
addRequestParameter("method", "preview");
addRequestParameter("input", "loan");
addRequestParameter("notes", "Test");
addRequestParameter("accountTypeId", accountBO.getType().getValue().toString());
addRequestParameter("newStatusId", "8");
addRequestParameter("flagId", "1");
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
actionPerform();
verifyForward("preview_success");
StaticHibernateUtil.flushSession();
setRequestPathInfo("/editStatusAction.do");
addRequestParameter("method", "update");
addRequestParameter("notes", "Test");
addRequestParameter("accountTypeId", accountBO.getType().getValue().toString());
addRequestParameter("newStatusId", "8");
addRequestParameter("flagId", "1");
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
actionPerform();
verifyForward(ActionForwards.loan_detail_page.toString());
verifyNoActionErrors();
verifyNoActionMessages();
accountBO = TestObjectFactory.getObject(AccountBO.class, accountBO.getAccountId());
List<AuditLog> auditLogList = TestObjectFactory.getChangeLog(EntityType.LOAN, accountBO.getAccountId());
Assert.assertEquals(1, auditLogList.size());
Assert.assertEquals(EntityType.LOAN.getValue(), auditLogList.get(0).getEntityType());
Assert.assertEquals(3, auditLogList.get(0).getAuditLogRecords().size());
for (AuditLogRecord auditLogRecord : auditLogList.get(0).getAuditLogRecords()) {
if (auditLogRecord.getFieldName().equalsIgnoreCase("Explanation")) {
Assert.assertEquals("-", auditLogRecord.getOldValue());
Assert.assertEquals("Withdraw", auditLogRecord.getNewValue());
} else if (auditLogRecord.getFieldName().equalsIgnoreCase("Status")) {
Assert.assertEquals("Active in Good Standing", auditLogRecord.getOldValue());
Assert.assertEquals("Closed- Rescheduled", auditLogRecord.getNewValue());
}
}
}
use of org.junit.Ignore in project head by mifos.
the class LegacyLoanDaoIntegrationTest method testGetTotalOutstandingPrincipalOfLoanAccountsInActiveGoodStandingByBranchId.
@Ignore
@Test
public void testGetTotalOutstandingPrincipalOfLoanAccountsInActiveGoodStandingByBranchId() throws Exception {
short branchId = 3;
BigDecimal money = legacyLoanDao.getTotalOutstandingPrincipalOfLoanAccountsInActiveGoodStanding(branchId, (short) -1, (short) -1);
Assert.assertEquals(0, new BigDecimal(600).compareTo(money));
}
use of org.junit.Ignore in project head by mifos.
the class LegacyLoanDaoIntegrationTest method testGetTotalOutstandingPrincipalOfLoanAccountsInActiveGoodStandingByBranchIdAndLoanOfficerId.
@Ignore
@Test
public void testGetTotalOutstandingPrincipalOfLoanAccountsInActiveGoodStandingByBranchIdAndLoanOfficerId() throws Exception {
short branchId = 3;
short loanOfficerId = 3;
BigDecimal money = legacyLoanDao.getTotalOutstandingPrincipalOfLoanAccountsInActiveGoodStanding(branchId, loanOfficerId, (short) -1);
Assert.assertEquals(0, new BigDecimal(600).compareTo(money));
}
use of org.junit.Ignore in project head by mifos.
the class LoanScheduleEntityIntegrationTest method testGetDueAmounts.
@Ignore
@Test
public void testGetDueAmounts() {
LoanScheduleEntity accountActionDate = (LoanScheduleEntity) groupLoan.getAccountActionDates().toArray()[0];
accountActionDate.setPrincipalPaid(new Money(getCurrency(), "10.0"));
accountActionDate.setInterestPaid(new Money(getCurrency(), "2.0"));
accountActionDate.setPenalty(new Money(getCurrency(), "20.0"));
accountActionDate.setPenaltyPaid(new Money(getCurrency(), "5.0"));
accountActionDate.setMiscPenalty(new Money(getCurrency(), "10.0"));
accountActionDate.setMiscFee(new Money(getCurrency(), "20.0"));
accountActionDate.setMiscFeePaid(new Money(getCurrency(), "5.0"));
Assert.assertEquals(TestUtils.createMoney(115.0), accountActionDate.getDueAmnts().getFeesOverdue());
}
Aggregations