@Test public void testFormatCoinAmount_uBTC_de_DE() throws Exception { languageConfiguration.setLocale(Locale.GERMANY); bitcoinConfiguration.setDecimalSeparator(","); bitcoinConfiguration.setGroupingSeparator("."); bitcoinConfiguration.setBitcoinSymbol(BitcoinSymbol.UBTC.name()); String balance = Formats.formatCoinAmount(Coin.parseCoin(testAmounts[0]), languageConfiguration, bitcoinConfiguration); assertThat(balance).isEqualTo("20.999.999.123.456,78"); balance = Formats.formatCoinAmount(Coin.parseCoin(testAmounts[1]), languageConfiguration, bitcoinConfiguration); assertThat(balance).isEqualTo("1.000.000,00"); balance = Formats.formatCoinAmount(Coin.parseCoin(testAmounts[2]), languageConfiguration, bitcoinConfiguration); assertThat(balance).isEqualTo("0,01"); }
public static String formatCoinAmount(Coin coin, LanguageConfiguration languageConfiguration, BitcoinConfiguration bitcoinConfiguration) { String[] formattedAmount = formatCoinAsSymbolic(coin, languageConfiguration, bitcoinConfiguration); return formattedAmount[0] + formattedAmount[1]; }
Formats { public static String formatCoinAmount(Coin coin, LanguageConfiguration languageConfiguration, BitcoinConfiguration bitcoinConfiguration) { String[] formattedAmount = formatCoinAsSymbolic(coin, languageConfiguration, bitcoinConfiguration); return formattedAmount[0] + formattedAmount[1]; } }
Formats { public static String formatCoinAmount(Coin coin, LanguageConfiguration languageConfiguration, BitcoinConfiguration bitcoinConfiguration) { String[] formattedAmount = formatCoinAsSymbolic(coin, languageConfiguration, bitcoinConfiguration); return formattedAmount[0] + formattedAmount[1]; }  }
Formats { public static String formatCoinAmount(Coin coin, LanguageConfiguration languageConfiguration, BitcoinConfiguration bitcoinConfiguration) { String[] formattedAmount = formatCoinAsSymbolic(coin, languageConfiguration, bitcoinConfiguration); return formattedAmount[0] + formattedAmount[1]; }  static String[] formatCoinAsSymbolic(
    Coin coin,
    LanguageConfiguration languageConfiguration,
    BitcoinConfiguration bitcoinConfiguration
  ); static String[] formatCoinAsSymbolic(
    Coin coin,
    LanguageConfiguration languageConfiguration,
    BitcoinConfiguration bitcoinConfiguration,
    boolean showNegative
  ); static String formatCoinAsSymbolicText(
    Coin coin,
    LanguageConfiguration languageConfiguration,
    BitcoinConfiguration bitcoinConfiguration
  ); static String formatCoinAmount(Coin coin, LanguageConfiguration languageConfiguration, BitcoinConfiguration bitcoinConfiguration); static String formatLocalAmount(BigDecimal amount, Locale locale, BitcoinConfiguration bitcoinConfiguration, boolean showNegative); static String formatExchangeRate(
    Optional<String> exchangeRate,
    LanguageConfiguration languageConfiguration,
    BitcoinConfiguration bitcoinConfiguration
  ); static String formatAlertMessage(TransactionSeenEvent event); static Optional<String> formatAlertMessage(BitcoinURI bitcoinURI); static Optional<String> formatAlertMessage(PaymentSessionSummary paymentSessionSummary); }
Formats { public static String formatCoinAmount(Coin coin, LanguageConfiguration languageConfiguration, BitcoinConfiguration bitcoinConfiguration) { String[] formattedAmount = formatCoinAsSymbolic(coin, languageConfiguration, bitcoinConfiguration); return formattedAmount[0] + formattedAmount[1]; }  static String[] formatCoinAsSymbolic(
    Coin coin,
    LanguageConfiguration languageConfiguration,
    BitcoinConfiguration bitcoinConfiguration
  ); static String[] formatCoinAsSymbolic(
    Coin coin,
    LanguageConfiguration languageConfiguration,
    BitcoinConfiguration bitcoinConfiguration,
    boolean showNegative
  ); static String formatCoinAsSymbolicText(
    Coin coin,
    LanguageConfiguration languageConfiguration,
    BitcoinConfiguration bitcoinConfiguration
  ); static String formatCoinAmount(Coin coin, LanguageConfiguration languageConfiguration, BitcoinConfiguration bitcoinConfiguration); static String formatLocalAmount(BigDecimal amount, Locale locale, BitcoinConfiguration bitcoinConfiguration, boolean showNegative); static String formatExchangeRate(
    Optional<String> exchangeRate,
    LanguageConfiguration languageConfiguration,
    BitcoinConfiguration bitcoinConfiguration
  ); static String formatAlertMessage(TransactionSeenEvent event); static Optional<String> formatAlertMessage(BitcoinURI bitcoinURI); static Optional<String> formatAlertMessage(PaymentSessionSummary paymentSessionSummary); static final int EXCHANGE_RATE_DECIMAL_PLACES_OFFSET; }