public void TestGetRelatedArtistValid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); List <Artist> ArtistList = Musixmatch.GetRelatedArtist("56"); String actual = ArtistList.ElementAt(0).ArtistName; String expected = "OutKast"; Assert.AreEqual(expected, actual); }
public void TestGetRelatedArtistInvalid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); try { List <Artist> ArtistList = Musixmatch.GetRelatedArtist("-"); } catch (StatusCodeException e) { String actual = e.Message; String expected = "STATUS CODE 404 : The requested resource was not found."; Assert.AreEqual(expected, actual); } }