use of javax.money.convert.CurrencyConversion in project jsr354-ri-bp by JavaMoney.
the class IdentityRateProviderTest method shouldReturnsSameEuroValue.
@Test
public void shouldReturnsSameEuroValue() {
CurrencyConversion currencyConversion = provider.getCurrencyConversion(EURO);
assertNotNull(currencyConversion);
MonetaryAmount money = Money.of(BigDecimal.TEN, EURO);
MonetaryAmount result = currencyConversion.apply(money);
assertEquals(result.getCurrency(), EURO);
assertEquals(result.getNumber().numberValue(BigDecimal.class), BigDecimal.TEN);
}
Aggregations