public void TestGetTrackValid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); String actual = Musixmatch.GetTrack("5920049").AlbumName; String expected = "Five Leaves Left"; Assert.AreEqual(expected, actual); }
public void TestGetTrackInvalid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); try { Track Track = Musixmatch.GetTrack("-1"); } catch (StatusCodeException e) { String actual = e.Message; String expected = "STATUS CODE 404 : The requested resource was not found."; Assert.AreEqual(expected, actual); } }