@Test public void shouldReturnAmountFractionDenominator() { NumberValue numberValue = DefaultNumberValue.of(BigDecimal.valueOf(132.21)); assertEquals(100L, numberValue.getAmountFractionDenominator()); }
@Test public void shouldReturnAmountFractionDenominatorForNegativeScale() { NumberValue numberValue = DefaultNumberValue.of(BigDecimal.valueOf(10.00)); assertEquals(1, numberValue.getAmountFractionDenominator()); }
@Test public void shoudReturnAmountFractionNumerator() { NumberValue numberValue = DefaultNumberValue.of(BigDecimal.valueOf(62.5)); assertEquals(5L, numberValue.getAmountFractionNumerator()); assertEquals(10L, numberValue.getAmountFractionDenominator()); }