use of java.util.Locale in project head by mifos.
the class HolidayServiceTest method setUp.
@Before
public void setUp() {
holidayService = new HolidayServiceImpl(null, holidayDao, null, fiscalCalendarRules);
locale = new Locale("en", "GB");
dateFormat = computeDateFormat(locale);
officeId = Short.valueOf("1");
}
use of java.util.Locale in project head by mifos.
the class CenterStatusChangeIntegrationTest method cleanDatabaseTables.
@Before
public void cleanDatabaseTables() throws Exception {
databaseCleaner.clean();
Locale locale = Localization.getInstance().getConfiguredLocale();
AuditConfiguration.init(locale);
existingUser = IntegrationTestObjectMother.testUser();
existingLoanOfficer = IntegrationTestObjectMother.testUser();
existingOffice = IntegrationTestObjectMother.sampleBranchOffice();
existingMeeting = new MeetingBuilder().customerMeeting().weekly().every(1).startingToday().build();
IntegrationTestObjectMother.saveMeeting(existingMeeting);
}
use of java.util.Locale in project head by mifos.
the class ClientCustActionStrutsTest method setUp.
@Before
public void setUp() throws Exception {
userContext = TestObjectFactory.getContext();
userContext.setPreferredLocale(new Locale("en", "GB"));
request.getSession().setAttribute(Constants.USERCONTEXT, userContext);
addRequestParameter("recordLoanOfficerId", "1");
addRequestParameter("recordOfficeId", "1");
request.getSession(false).setAttribute("ActivityContext", TestObjectFactory.getActivityContext());
flowKey = createFlow(request, ClientCustAction.class);
request.getSession().setAttribute(Constants.USERCONTEXT, userContext);
EntityMasterData.getInstance().init();
ClientRules.init();
FieldConfig fieldConfig = FieldConfig.getInstance();
fieldConfig.init();
getActionServlet().getServletContext().setAttribute(Constants.FIELD_CONFIGURATION, fieldConfig.getEntityMandatoryFieldMap());
}
use of java.util.Locale in project head by mifos.
the class CustomerHelpersIntegrationTest method testCustomerRecentActivityView.
@Test
public void testCustomerRecentActivityView() throws Exception {
java.sql.Date sampleDate = new java.sql.Date(System.currentTimeMillis());
CustomerRecentActivityDto customerRecentActivityDto = new CustomerRecentActivityDto(sampleDate, "description", "1000", "mifos");
customerRecentActivityDto.setLocale(new Locale("1"));
Assert.assertEquals("date", sampleDate, customerRecentActivityDto.getActivityDate());
Assert.assertEquals("description", customerRecentActivityDto.getDescription());
Assert.assertEquals("1000", customerRecentActivityDto.getAmount());
Assert.assertEquals("mifos", customerRecentActivityDto.getPostedBy());
Assert.assertEquals("1", customerRecentActivityDto.getLocale().toString());
}
use of java.util.Locale in project head by mifos.
the class MifosDoubleConverterTest method xtestConvert_is_IS.
/**
* Currently broken -- incomplete support for multiple locales for numeric input.
*/
@Ignore
public void xtestConvert_is_IS() {
LocalizationConverter converter = new LocalizationConverter();
converter.setCurrentLocale(new Locale("IS", "is"));
Assert.assertEquals(new Double(2.0), mifosDoubleConverter.convert(String.class, "2,0"));
}
Aggregations