use of org.javamoney.moneta.RoundedMoney in project jsr354-ri-bp by JavaMoney.
the class DefaultMonetaryRoundedFactoryTest method shouldCreateMonetaryAmount.
@Test
public void shouldCreateMonetaryAmount() {
MonetaryAmount monetaryAmount = factory.create(BigDecimal.TEN, real);
assertNotNull(monetaryAmount);
assertTrue(RoundedMoney.class.isInstance(monetaryAmount));
RoundedMoney roundedMoney = RoundedMoney.class.cast(monetaryAmount);
assertEquals(real, roundedMoney.getCurrency());
assertEquals(BigDecimal.TEN, roundedMoney.getNumber().numberValue(BigDecimal.class));
}
Aggregations