public async Task GetUrbanQuoteAsync([Remainder] string searchTerm) { var quotes = await _urbanService.GetUrbanQuotesAsync(searchTerm); string definitions = _urbanService.ParseQuotes(quotes); if (definitions.Length > 0) { await ReplyAsync(definitions); } else { await ReplyAsync("No definitions found."); } }
public void Service_ShouldThrowException_WhenNoSearchTermGiven() { Assert.That(async() => await _urbanService.GetUrbanQuotesAsync(null), Throws.TypeOf <ArgumentException>()); }