use of org.mifos.application.master.business.MifosCurrency in project head by mifos.
the class CollectionSheetServiceFacadeWebTierTest method setupMifosLoggerDueToUseOfStaticClientRules.
@BeforeClass
public static void setupMifosLoggerDueToUseOfStaticClientRules() {
defaultCurrency = new MifosCurrency(defaultCurrencyId, null, null, null);
Money.setDefaultCurrency(defaultCurrency);
}
use of org.mifos.application.master.business.MifosCurrency in project head by mifos.
the class BranchReportConfigServiceIntegrationTest method testGetCurrency.
@Test
public void testGetCurrency() throws Exception {
MifosCurrency currency = branchReportConfigService.getCurrency();
Assert.assertNotNull(currency);
}
use of org.mifos.application.master.business.MifosCurrency in project head by mifos.
the class MoneyTest method testRoundRepeating.
@Test
public void testRoundRepeating() {
MifosCurrency currency = new MifosCurrency((short) 1, "test", BigDecimal.valueOf(3.0), "USD");
Money money = new Money(currency, "1");
Assert.assertEquals(new Money(currency, "3"), Money.round(money, currency.getRoundingAmount(), RoundingMode.CEILING));
}
use of org.mifos.application.master.business.MifosCurrency in project head by mifos.
the class LoanServiceFacadeWebTierTest method setupAndInjectDependencies.
@Before
public void setupAndInjectDependencies() {
locale = new Locale("en", "GB");
installmentBuilder = new RepaymentScheduleInstallmentBuilder(locale);
rupee = new MifosCurrency(Short.valueOf("1"), "Rupee", BigDecimal.valueOf(1), "INR");
loanServiceFacade = new LoanServiceFacadeWebTier(loanDao, loanBusinessService);
}
use of org.mifos.application.master.business.MifosCurrency in project head by mifos.
the class ConfigurationPersistenceIntegrationTest method testGetCurrencyForCurrencyId.
@Test
public void testGetCurrencyForCurrencyId() throws Exception {
ConfigurationPersistence configurationPersistence = new ConfigurationPersistence();
MifosCurrency currency = configurationPersistence.getPersistentObject(MifosCurrency.class, Short.valueOf("2"));
Assert.assertNotNull(currency);
Assert.assertEquals("Indian Rupee", currency.getCurrencyName());
}
Aggregations