use of org.mifos.framework.business.util.Address in project head by mifos.
the class PersonnelSettingsActionStrutsTest method createPersonnel.
private PersonnelBO createPersonnel(OfficeBO office, PersonnelLevel personnelLevel) throws Exception {
List<CustomFieldDto> customFieldDto = new ArrayList<CustomFieldDto>();
customFieldDto.add(new CustomFieldDto(Short.valueOf("9"), "123456", CustomFieldType.NUMERIC.getValue()));
Address address = new Address("abcd", "abcd", "abcd", "abcd", "abcd", "abcd", "abcd", "abcd");
Date date = new Date();
personnel = new PersonnelBO(personnelLevel, office, Integer.valueOf("1"), Short.valueOf("1"), "ABCD", "XYZ", "xyz@yahoo.com", getRoles(), customFieldDto, new Name("XYZ", null, null, "ABC"), "111111", date, Integer.valueOf("1"), Integer.valueOf("1"), date, date, address, userContext.getId(), new Date(), new HashSet());
IntegrationTestObjectMother.createPersonnel(personnel);
return IntegrationTestObjectMother.findPersonnelById(personnel.getPersonnelId());
}
use of org.mifos.framework.business.util.Address in project head by mifos.
the class LegacyPersonnelDaoIntegrationTest method create.
private PersonnelBO create(final PersonnelLevel personnelLevel, final Name name, final Short createdBy, final OfficeBO office) throws Exception {
List<CustomFieldDto> customFieldDto = new ArrayList<CustomFieldDto>();
customFieldDto.add(new CustomFieldDto(Short.valueOf("9"), "123456", CustomFieldType.NUMERIC.getValue()));
Address address = new Address("abcd", "abcd", "abcd", "abcd", "abcd", "abcd", "abcd", "abcd");
Date date = new Date();
personnel = new PersonnelBO(personnelLevel, office, Integer.valueOf("1"), Short.valueOf("1"), "ABCD", "XYZ", "xyz@yahoo.com", null, customFieldDto, name, "111111", date, Integer.valueOf("1"), Integer.valueOf("1"), date, date, address, createdBy, new Date(), new HashSet());
IntegrationTestObjectMother.createPersonnel(personnel);
return IntegrationTestObjectMother.findPersonnelById(personnel.getPersonnelId());
}
use of org.mifos.framework.business.util.Address in project head by mifos.
the class PersonActionStrutsTest method createPersonnelAndSetInSession.
private void createPersonnelAndSetInSession(OfficeBO office, PersonnelLevel personnelLevel) throws Exception {
List<CustomFieldDto> customFieldDto = new ArrayList<CustomFieldDto>();
customFieldDto.add(new CustomFieldDto(Short.valueOf("9"), "123456", CustomFieldType.NUMERIC.getValue()));
Address address = new Address("abcd", "abcd", "abcd", "abcd", "abcd", "abcd", "abcd", "abcd");
Name name = new Name("XYZ", null, null, "Last Name");
Date date = new Date();
personnel = new PersonnelBO(personnelLevel, office, Integer.valueOf("1"), Short.valueOf("1"), "ABCD", "XYZ", "xyz@yahoo.com", null, customFieldDto, name, "111111", date, Integer.valueOf("1"), Integer.valueOf("1"), date, date, address, userContext.getId(), new Date(), new HashSet());
IntegrationTestObjectMother.createPersonnel(personnel);
personnel = IntegrationTestObjectMother.findPersonnelById(personnel.getPersonnelId());
SessionUtils.setAttribute(Constants.BUSINESS_KEY, personnel, request);
}
use of org.mifos.framework.business.util.Address in project head by mifos.
the class PersonnelBusinessServiceIntegrationTest method createPersonnel.
private PersonnelBO createPersonnel(OfficeBO office, PersonnelLevel personnelLevel) throws Exception {
List<CustomFieldDto> customFieldDto = new ArrayList<CustomFieldDto>();
customFieldDto.add(new CustomFieldDto(Short.valueOf("9"), "123456", CustomFieldType.NUMERIC.getValue()));
Address address = new Address("abcd", "abcd", "abcd", "abcd", "abcd", "abcd", "abcd", "abcd");
Date date = new Date();
personnel = new PersonnelBO(personnelLevel, office, Integer.valueOf("1"), Short.valueOf("1"), "ABCD", "XYZ", "xyz@yahoo.com", null, customFieldDto, new Name("XYZ", null, null, null), "111111", date, Integer.valueOf("1"), Integer.valueOf("1"), date, date, address, PersonnelConstants.SYSTEM_USER, new Date(), new HashSet());
IntegrationTestObjectMother.createPersonnel(personnel);
return IntegrationTestObjectMother.findPersonnelById(personnel.getPersonnelId());
}
use of org.mifos.framework.business.util.Address in project head by mifos.
the class AddGroupMembershipActionStrutsTest method createAndSetClientInSession.
private void createAndSetClientInSession() throws Exception {
OfficeBO office = new OfficePersistence().getOffice(TestObjectFactory.HEAD_OFFICE);
PersonnelBO personnel = legacyPersonnelDao.getPersonnel(PersonnelConstants.TEST_USER);
meeting = getMeeting();
ClientNameDetailDto clientNameDetailDto = new ClientNameDetailDto(NameType.CLIENT.getValue(), 1, "Client", "", "1", "");
clientNameDetailDto.setNames(ClientRules.getNameSequence());
ClientNameDetailDto spouseNameDetailView = new ClientNameDetailDto(NameType.SPOUSE.getValue(), 1, "first", "middle", "last", "secondLast");
spouseNameDetailView.setNames(ClientRules.getNameSequence());
ClientPersonalDetailDto clientPersonalDetailDto = new ClientPersonalDetailDto(1, 1, 1, 1, 1, 1, Short.valueOf("1"), Short.valueOf("1"), Short.valueOf("41"));
client = new ClientBO(TestUtils.makeUser(), clientNameDetailDto.getDisplayName(), CustomerStatus.fromInt(new Short("1")), null, null, new Address(), getCustomFields(), null, null, personnel, office, meeting, personnel, new java.util.Date(), null, null, null, YesNoFlag.NO.getValue(), clientNameDetailDto, spouseNameDetailView, clientPersonalDetailDto, null);
legacyClientDao.saveClient(client);
StaticHibernateUtil.flushSession();
client = TestObjectFactory.getClient(Integer.valueOf(client.getCustomerId()).intValue());
request.setAttribute(Constants.CURRENTFLOWKEY, flowKey);
SessionUtils.setAttribute(Constants.BUSINESS_KEY, client, request);
}
Aggregations