Search in sources :

Example 31 with PersonnelBuilder

use of org.mifos.domain.builders.PersonnelBuilder in project head by mifos.

the class CenterUpdateUsingCustomerServiceIntegrationTest method cleanDatabaseTables.

@Before
public void cleanDatabaseTables() {
    databaseCleaner.clean();
    // setup
    String centerName = "Center-IntegrationTest";
    OfficeBO existingBranch = sampleBranchOffice();
    PersonnelBO existingLoanOfficer = testUser();
    MeetingBO weeklyMeeting = new MeetingBuilder().customerMeeting().weekly().every(1).startingToday().build();
    DateTime today = new DateTime();
    Address noAddress = null;
    String noExternalId = null;
    center = new CenterBuilder().withName(centerName).with(weeklyMeeting).with(existingBranch).withLoanOfficer(existingLoanOfficer).withMfiJoiningDate(today).with(noAddress).withExternalId(noExternalId).withUserContext().build();
    IntegrationTestObjectMother.createCenter(center, center.getCustomerMeetingValue());
    otherLoanOfficer = new PersonnelBuilder().withUsername("CenterUpdateUsingCustomerServiceIntegrationTest").withDisplayName("otherLoanOfficer").with(existingBranch).build();
    IntegrationTestObjectMother.createPersonnel(otherLoanOfficer);
}
Also used : PersonnelBuilder(org.mifos.domain.builders.PersonnelBuilder) Address(org.mifos.framework.business.util.Address) OfficeBO(org.mifos.customers.office.business.OfficeBO) PersonnelBO(org.mifos.customers.personnel.business.PersonnelBO) MeetingBO(org.mifos.application.meeting.business.MeetingBO) CenterBuilder(org.mifos.domain.builders.CenterBuilder) MeetingBuilder(org.mifos.domain.builders.MeetingBuilder) DateTime(org.joda.time.DateTime) Before(org.junit.Before)

Aggregations

PersonnelBO (org.mifos.customers.personnel.business.PersonnelBO)31 PersonnelBuilder (org.mifos.domain.builders.PersonnelBuilder)31 Test (org.junit.Test)27 SavingsAccountBuilder (org.mifos.domain.builders.SavingsAccountBuilder)18 Money (org.mifos.framework.util.helpers.Money)12 DateTime (org.joda.time.DateTime)10 InterestCalculationPeriodResult (org.mifos.accounts.savings.interest.InterestCalculationPeriodResult)8 InterestCalculationPeriodResultBuilder (org.mifos.accounts.savings.interest.InterestCalculationPeriodResultBuilder)8 InterestPostingPeriodResult (org.mifos.accounts.savings.interest.InterestPostingPeriodResult)8 InterestPostingPeriodResultBuilder (org.mifos.accounts.savings.interest.InterestPostingPeriodResultBuilder)8 InterestScheduledEvent (org.mifos.accounts.savings.interest.schedule.InterestScheduledEvent)8 MonthlyOnLastDayOfMonthInterestScheduledEvent (org.mifos.accounts.savings.interest.schedule.internal.MonthlyOnLastDayOfMonthInterestScheduledEvent)8 AccountPaymentEntity (org.mifos.accounts.business.AccountPaymentEntity)7 OfficeBO (org.mifos.customers.office.business.OfficeBO)7 OfficeBuilder (org.mifos.domain.builders.OfficeBuilder)7 LocalDate (org.joda.time.LocalDate)6 GroupBuilder (org.mifos.domain.builders.GroupBuilder)6 ArrayList (java.util.ArrayList)5 AccountNotesEntity (org.mifos.accounts.business.AccountNotesEntity)5 AccountNotesEntityBuilder (org.mifos.accounts.business.AccountNotesEntityBuilder)5