示例#1
0
        public async Task GetExchangeRateForGivenDate_WorksAsExpected()
        {
            // Act -
            var exchangeRate = await _pokedollarServiceProvider.GetExchangeRateForThisDate("2020-03-17");

            // Assert -
            Assert.IsTrue(exchangeRate.Title.Length > 0);
            Assert.IsTrue(exchangeRate.ImageUrl.Length > 0);
            Assert.IsTrue(exchangeRate.Description.Length > 0);
        }
示例#2
0
        private async Task SendPokedollarMessageForGivenDate(CommandContext ctx, string date)
        {
            var exchangeRateMessage = await _serviceProvider.GetExchangeRateForThisDate(date);

            await ctx.Message.RespondAsync(embed : exchangeRateMessage);
        }