Example #1
0
        private static async Task CheckIfApiIsOnline(RatesExchangeApiService client)
        {
            Console.WriteLine("-- Check if API is online");
            var parsed = JsonConvert.SerializeObject(await client.CheckIfApiIsOnline(), Formatting.Indented);

            Console.WriteLine(parsed);
        }
        public async Task ValidApiKeyRetrievesData()
        {
            var client = new RatesExchangeApiService(ApiKey);
            var result = await client.CheckIfApiIsOnline();

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