Enforce upper bound on MobileCoin/fiat entry.

This commit is contained in:
Alan Evans
2021-04-09 11:15:47 -03:00
parent 5daa027c10
commit 113393de8f
5 changed files with 49 additions and 30 deletions

View File

@@ -336,6 +336,11 @@ public final class MoneyTest_MobileCoin {
assertSame(Money.MobileCoin.ZERO, mobileCoin.toZero());
}
@Test
public void max_long_value() {
assertEquals("MOB:18446744073709551615", Money.MobileCoin.MAX_VALUE.serialize());
}
private static Money.MobileCoin mobileCoin2(double value) {
return Money.mobileCoin(BigDecimal.valueOf(value));
}