use of org.knowm.xchange.coinmarketcap.pro.v1.dto.marketdata.CmcCurrency in project XChange by knowm.
the class CurrencyMapFetchIntegration method getCmcCurrencyListTest.
@Test
public void getCmcCurrencyListTest() throws Exception {
List<CmcCurrency> currencyList = cmcMarketDataService.getCmcCurrencyList();
assertThat(currencyList).isNotNull();
assertThat(currencyList.size()).isGreaterThan(0);
Optional<CmcCurrency> btcOptional = currencyList.stream().filter(currency -> "BTC".equals(currency.getSymbol())).findAny();
CmcCurrency btc = btcOptional.get();
assertThat(btc).isNotNull();
}
Aggregations