Пример #1
0
        private static async Task ConvertCurrency(RatesExchangeApiService client, string fromCurrency, string amount, string date, List <string> currencies)
        {
            Console.WriteLine($"-- Convert {amount} {fromCurrency} to {currencies}.");
            var parsed = JsonConvert.SerializeObject(await client.ConvertCurrency(fromCurrency, amount, date, currencies), Formatting.Indented);

            Console.WriteLine(parsed);
        }
Пример #2
0
        public async Task CanConvertCurrency()
        {
            var client = new RatesExchangeApiService(ApiKey);
            var result = await client.ConvertCurrency(BaseCurrency, "100", HistoryDateForRates);

            Assert.That(result, Is.Not.Null);
            Assert.That(result.Rates, Is.Not.Null);
        }