Search in sources :

Example 1 with BranchReportService

use of org.mifos.reports.business.service.BranchReportService in project head by mifos.

the class BranchReportStaffSummaryHelperIntegrationTest method testPopulateStaffSummary.

@Test
public void testPopulateStaffSummary() throws BatchJobException {
    BranchReportBO branchReportBO = new BranchReportBO(BRANCH_ID_SHORT, RUN_DATE);
    BranchReportStaffSummaryHelper staffSummaryHelper = new BranchReportStaffSummaryHelper(branchReportBO, new BranchReportService(), getConfigServiceStub());
    staffSummaryHelper.populateStaffSummary();
    Set<BranchReportStaffSummaryBO> staffSummaries = branchReportBO.getStaffSummaries();
    Assert.assertNotNull(staffSummaries);
}
Also used : BranchReportStaffSummaryBO(org.mifos.reports.branchreport.BranchReportStaffSummaryBO) BranchReportBO(org.mifos.reports.branchreport.BranchReportBO) BranchReportService(org.mifos.reports.business.service.BranchReportService) Test(org.junit.Test)

Example 2 with BranchReportService

use of org.mifos.reports.business.service.BranchReportService in project head by mifos.

the class BranchReportHelperIntegrationTest method testBatchCreatesRowForBranchReportBatchBO.

@Test
public void testBatchCreatesRowForBranchReportBatchBO() throws PersistenceException, ServiceException, BatchJobException {
    branchReportHelper = new BranchReportHelper();
    OfficeBO office = new OfficeBusinessService().getOffice(BRANCH_ID_SHORT);
    BranchReportBO generatedBranchReport = branchReportHelper.createBranchReport(session, office, RUN_DATE);
    IBranchReportService branchReportService = new BranchReportService();
    BranchReportBO retrievedBranchReports = branchReportService.getBranchReport(BRANCH_ID_SHORT, RUN_DATE);
    assertBranchReport(generatedBranchReport, retrievedBranchReports);
    assertClientSummaryReport(generatedBranchReport.getClientSummaries(), branchReportService);
    assertLoanArrearsAging(generatedBranchReport.getLoanArrearsAging(), branchReportService);
    assertStaffSummary(generatedBranchReport.getStaffSummaries(), branchReportService);
    assertStaffingLevelSummary(generatedBranchReport.getStaffingLevelSummaries(), branchReportService);
    assertLoanDetails(generatedBranchReport.getLoanDetails(), branchReportService);
    assertLoanArrearsProfile(generatedBranchReport.getLoanArrearsProfile(), branchReportService);
}
Also used : OfficeBO(org.mifos.customers.office.business.OfficeBO) OfficeBusinessService(org.mifos.customers.office.business.service.OfficeBusinessService) BranchReportBO(org.mifos.reports.branchreport.BranchReportBO) IBranchReportService(org.mifos.reports.business.service.IBranchReportService) BranchReportService(org.mifos.reports.business.service.BranchReportService) IBranchReportService(org.mifos.reports.business.service.IBranchReportService) Test(org.junit.Test)

Example 3 with BranchReportService

use of org.mifos.reports.business.service.BranchReportService in project head by mifos.

the class BranchReportStaffingLevelSummaryHelperIntegrationTest method testPopulateStaffingLevelSummary.

@Test
public void testPopulateStaffingLevelSummary() throws Exception {
    BranchReportBO branchReport = BranchReportBOFixture.createBranchReport(Integer.valueOf(1), BRANCH_ID, DateUtils.currentDate());
    new BranchReportStaffingLevelSummaryHelper(branchReport, new BranchReportService()).populateStaffingLevelSummary();
    assertStaffingLevelSummaries(branchReport);
}
Also used : BranchReportBO(org.mifos.reports.branchreport.BranchReportBO) BranchReportService(org.mifos.reports.business.service.BranchReportService) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 BranchReportBO (org.mifos.reports.branchreport.BranchReportBO)3 BranchReportService (org.mifos.reports.business.service.BranchReportService)3 OfficeBO (org.mifos.customers.office.business.OfficeBO)1 OfficeBusinessService (org.mifos.customers.office.business.service.OfficeBusinessService)1 BranchReportStaffSummaryBO (org.mifos.reports.branchreport.BranchReportStaffSummaryBO)1 IBranchReportService (org.mifos.reports.business.service.IBranchReportService)1