Exemple #1
0
        public async Task GetAllCoins()
        {
            var result = await _gateway.AllCurrencies();

            Assert.True(result.IsSuccess);
            Assert.NotEmpty(result?.Content);
            Assert.True(result.Content.Exists(x => x.Symbol == "ETH"));
        }
Exemple #2
0
        public async Task ImportAllCurrencies()
        {
            CommandResult <List <Currency> > result = await _cryptoCompareGateway.AllCurrencies();

            if (result?.Content?.Any() == true)
            {
                await _coreDBContext.AddRangeAsync(result.Content);

                await _coreDBContext.SaveChangesAsync();
            }
        }