public void Total() { var service = new LastFmService(new HttpClient()); const string expected = "Week [804 scrobbles total]"; var actual = $"Week {service.TotalScrobblesAsync("week", "UnitR_").Result}"; Assert.AreEqual(expected, actual, "Improperly formatted top."); }
//builds the embed for the chart private async Task <EmbedBuilder> BuildTopAsync(string list, string username, string ListType, string span) { var totalScrobbles = await lastFm.TotalScrobblesAsync(span, username); span = await LastFmService.FormatSpan(span.ToLowerInvariant()); var embed = new EmbedBuilder() .WithTitle($"Top {ListType} for {username} - {span} {totalScrobbles}") .WithDescription(list) .WithColor(Color.Gold); return(embed); }