use of org.mifos.config.business.SystemConfiguration in project head by mifos.
the class ConfigurationInitializer method createSystemConfiguration.
protected SystemConfiguration createSystemConfiguration() throws SystemException {
MifosCurrency defaultCurrency = null;
try {
defaultCurrency = AccountingRules.getMifosCurrency(new ConfigurationPersistence());
} catch (RuntimeException re) {
throw new SystemException("cannot fetch default currency", re);
}
// TODO: pick timezone offset from database
int timeZone = 19800000;
return new SystemConfiguration(defaultCurrency, timeZone);
}
use of org.mifos.config.business.SystemConfiguration in project head by mifos.
the class ConfigurationIntializerIntegrationTest method testCreateSystemCache.
@Test
public void testCreateSystemCache() throws Exception {
SystemConfiguration configuration = configInitializer.createSystemConfiguration();
Assert.assertNotNull(configuration);
Assert.assertNotNull(configuration.getCurrency());
Assert.assertNotNull(configuration.getMifosTimeZone());
}
Aggregations