Search in sources :

Example 31 with ApplicableAccountFeeDto

use of org.mifos.dto.domain.ApplicableAccountFeeDto in project head by mifos.

the class GroupServiceFacadeWebTierIntegrationTest method createGroup.

private CustomerDetailsDto createGroup(String displayName, Short officeId) {
    MeetingBO meeting = new MeetingBuilder().withStartDate(new DateTime().minusWeeks(2)).build();
    MeetingDto meetingDto = meeting.toDto();
    String externalId = null;
    AddressDto addressDto = null;
    PersonnelBO user = IntegrationTestObjectMother.findPersonnelById(Short.valueOf("1"));
    Short loanOfficerId = user.getPersonnelId();
    List<ApplicableAccountFeeDto> feesToApply = new ArrayList<ApplicableAccountFeeDto>();
    Short customerStatus = CustomerStatus.GROUP_ACTIVE.getValue();
    boolean trained = false;
    DateTime trainedOn = null;
    String parentSystemId = null;
    DateTime mfiJoiningDate = new DateTime().minusWeeks(2);
    DateTime activationDate = new DateTime().minusWeeks(1);
    GroupCreationDetail groupCenterDetail = new GroupCreationDetail(displayName, externalId, addressDto, loanOfficerId, feesToApply, customerStatus, trained, trainedOn, parentSystemId, officeId, mfiJoiningDate, activationDate);
    // exercise test
    CustomerDetailsDto newlyCreatedGroupDetails = groupServiceFacade.createNewGroup(groupCenterDetail, meetingDto);
    return newlyCreatedGroupDetails;
}
Also used : MeetingBO(org.mifos.application.meeting.business.MeetingBO) ArrayList(java.util.ArrayList) AddressDto(org.mifos.dto.domain.AddressDto) ApplicableAccountFeeDto(org.mifos.dto.domain.ApplicableAccountFeeDto) GroupCreationDetail(org.mifos.dto.domain.GroupCreationDetail) DateTime(org.joda.time.DateTime) MeetingDto(org.mifos.dto.domain.MeetingDto) PersonnelBO(org.mifos.customers.personnel.business.PersonnelBO) MeetingBuilder(org.mifos.domain.builders.MeetingBuilder) CustomerDetailsDto(org.mifos.dto.domain.CustomerDetailsDto)

Example 32 with ApplicableAccountFeeDto

use of org.mifos.dto.domain.ApplicableAccountFeeDto in project head by mifos.

the class CenterActionStrutsTest method testFailureFeeFrequencyMismatch.

@Test
public void testFailureFeeFrequencyMismatch() throws Exception {
    List<FeeDto> feesToRemove = getFees(RecurrenceType.MONTHLY);
    setRequestPathInfo("/centerCustAction.do");
    addRequestParameter("method", "load");
    addRequestParameter("officeId", "3");
    actionPerform();
    SessionUtils.setAttribute(CustomerConstants.CUSTOMER_MEETING, new MeetingBO(RecurrenceType.MONTHLY, Short.valueOf("3"), new Date(), MeetingType.CUSTOMER_MEETING), request);
    List<ApplicableAccountFeeDto> feeList = retrieveAdditionalFeesFromSession();
    ApplicableAccountFeeDto fee = feeList.get(0);
    setRequestPathInfo("/centerCustAction.do");
    addRequestParameter("method", "preview");
    addRequestParameter("displayName", "center");
    addRequestParameter("loanOfficerId", "1");
    addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
    addRequestParameter("selectedFee[0].feeId", fee.getFeeId().toString());
    addRequestParameter("selectedFee[0].amount", fee.getAmount());
    actionPerform();
    Assert.assertEquals("Fee", 1, getErrorSize(CustomerConstants.ERRORS_FEE_FREQUENCY_MISMATCH));
}
Also used : MeetingBO(org.mifos.application.meeting.business.MeetingBO) ApplicableAccountFeeDto(org.mifos.dto.domain.ApplicableAccountFeeDto) FeeDto(org.mifos.accounts.fees.business.FeeDto) ApplicableAccountFeeDto(org.mifos.dto.domain.ApplicableAccountFeeDto) Date(java.util.Date) Test(org.junit.Test)

Aggregations

ApplicableAccountFeeDto (org.mifos.dto.domain.ApplicableAccountFeeDto)32 ArrayList (java.util.ArrayList)19 Test (org.junit.Test)15 FeeDto (org.mifos.accounts.fees.business.FeeDto)15 MeetingBO (org.mifos.application.meeting.business.MeetingBO)14 Date (java.util.Date)7 CustomFieldDto (org.mifos.dto.domain.CustomFieldDto)7 MeetingDto (org.mifos.dto.domain.MeetingDto)7 List (java.util.List)6 AddressDto (org.mifos.dto.domain.AddressDto)6 LocalDate (org.joda.time.LocalDate)5 FeeBO (org.mifos.accounts.fees.business.FeeBO)5 PersonnelBO (org.mifos.customers.personnel.business.PersonnelBO)5 MeetingBuilder (org.mifos.domain.builders.MeetingBuilder)5 CustomerDetailsDto (org.mifos.dto.domain.CustomerDetailsDto)5 Address (org.mifos.framework.business.util.Address)5 DateTime (org.joda.time.DateTime)4 ClientFamilyDetailDto (org.mifos.dto.screen.ClientFamilyDetailDto)4 ClientNameDetailDto (org.mifos.dto.screen.ClientNameDetailDto)4 ClientPersonalDetailDto (org.mifos.dto.screen.ClientPersonalDetailDto)4