public void TestSearchTrackValid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); String actual = Musixmatch.SearchTrack(q_artist: "justin bieber").ElementAt(0).AlbumName; String expected = "Scarlatti, Rameau & Chopin: Piano Works"; Assert.AreEqual(expected, actual); }
public void TestSearchTrackInvalid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); try { List <Track> Track = Musixmatch.SearchTrack("-1", ""); } catch (StatusCodeException e) { String actual = e.Message; String expected = "STATUS CODE 404 : The requested resource was not found."; Assert.AreEqual(expected, actual); } }