public void GetArtistByAMGArtistId_ValidArtist_ReturnsArtist() { // Arrange iTunesSearchManager search = new iTunesSearchManager(); long amgArtistId = 116437; // Act var item = search.GetSongArtistByAMGArtistIdAsync(amgArtistId).Result; // Assert Assert.IsTrue(item.ArtistName == "R.E.M."); }
public void GetArtistByAMGArtistId_InvalidArtist_ReturnsDefaultInstanceOfSongArtist() { // Arrange iTunesSearchManager search = new iTunesSearchManager(); long amgArtistId = 5858500001; // Act var item = search.GetSongArtistByAMGArtistIdAsync(amgArtistId).Result; // Assert Assert.IsInstanceOfType(item, typeof(SongArtist)); Assert.IsTrue(item.ArtistName == default(string)); }