public void TestGetTracksChartValid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); String actual = Musixmatch.GetTracksChart("it").ElementAt(0).AlbumName; String expected = "Insieme: Grandi Amori"; Assert.AreEqual(expected, actual); }
public void TestGetTracksChartInvalid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); try { List <Track> Track = Musixmatch.GetTracksChart("-1", ""); } catch (StatusCodeException e) { String actual = e.Message; String expected = "STATUS CODE 404 : The requested resource was not found."; Assert.AreEqual(expected, actual); } }