Search in sources :

Example 11 with BranchReportBO

use of org.mifos.reports.branchreport.BranchReportBO in project head by mifos.

the class BranchReportServiceIntegrationTest method testGetStaffSummaryReportReturnsStaffSummaryForBranchAndDate.

@Test
public void testGetStaffSummaryReportReturnsStaffSummaryForBranchAndDate() throws Exception {
    BranchReportBO branchReportWithStaffSummary = createBranchReportWithStaffSummary(BRANCH_ID_SHORT, RUN_DATE);
    BranchReportBO otherBranchReportWithStaffSummary = createBranchReportWithStaffSummary(BRANCH_ID_SHORT, FIRST_JAN_2008);
    session.save(branchReportWithStaffSummary);
    session.save(otherBranchReportWithStaffSummary);
    List<BranchReportStaffSummaryBO> retrievedStaffSummary = branchReportService.getStaffSummary(BRANCH_ID, RUN_DATE_STR);
    Assert.assertEquals(1, retrievedStaffSummary.size());
    assertSameCollections(branchReportWithStaffSummary.getStaffSummaries(), retrievedStaffSummary);
}
Also used : BranchReportStaffSummaryBO(org.mifos.reports.branchreport.BranchReportStaffSummaryBO) BranchReportBO(org.mifos.reports.branchreport.BranchReportBO) Test(org.junit.Test)

Example 12 with BranchReportBO

use of org.mifos.reports.branchreport.BranchReportBO in project head by mifos.

the class BranchReportPersistenceIntegrationTest method testRetrievesBranchReportsForGivenDate.

@Test
public void testRetrievesBranchReportsForGivenDate() throws Exception {
    BranchReportBO branchReportBO = new BranchReportBO(BRANCH_ID, runDate);
    session.save(branchReportBO);
    List<BranchReportBO> retrievedBranchReports = branchReportPersistence.getBranchReport(runDate);
    assertListSizeAndTrueCondition(1, retrievedBranchReports, PredicateUtils.equalPredicate(branchReportBO));
}
Also used : BranchReportBO(org.mifos.reports.branchreport.BranchReportBO) Test(org.junit.Test)

Aggregations

BranchReportBO (org.mifos.reports.branchreport.BranchReportBO)12 Test (org.junit.Test)9 BranchReportService (org.mifos.reports.business.service.BranchReportService)3 Before (org.junit.Before)2 OfficeBO (org.mifos.customers.office.business.OfficeBO)2 OfficeBusinessService (org.mifos.customers.office.business.service.OfficeBusinessService)2 BranchReportLoanArrearsAgingBO (org.mifos.reports.branchreport.BranchReportLoanArrearsAgingBO)2 BranchReportStaffSummaryBO (org.mifos.reports.branchreport.BranchReportStaffSummaryBO)2 PersonnelBusinessService (org.mifos.customers.personnel.business.service.PersonnelBusinessService)1 PersistenceException (org.mifos.framework.exceptions.PersistenceException)1 LoanArrearsAgingPeriod (org.mifos.reports.branchreport.LoanArrearsAgingPeriod)1 BranchReportPersistence (org.mifos.reports.branchreport.persistence.BranchReportPersistence)1 IBranchReportService (org.mifos.reports.business.service.IBranchReportService)1