public void TestGetArtistAlbumsValid() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); List <Album> AlbumList = Musixmatch.GetArtistAlbums("41659"); String actual = AlbumList[0].ArtistName; String expected = "Sia"; Assert.AreEqual(expected, actual, $"Artist name Expected {expected} Was {actual}"); }
public void TestGetArtistAlbumsNull() { Musixmatch Musixmatch = new Musixmatch(Environment.GetEnvironmentVariable("MusixmatchApiToken")); try { List <Album> AlbumList = Musixmatch.GetArtistAlbums("696969696969696969"); } catch (StatusCodeException e) { String actual = e.Message; String expected = "STATUS CODE 404 : The requested resource was not found."; Assert.AreEqual(expected, actual); } }