public bool FollowArtist(string artistId) { bool isFollowed = _artistsUtils.GetFollowedArtists().Any(artist => artist.Id == artistId); if (isFollowed) { throw new ArgumentException("Artist is already followed."); } _spotifyApi.Spotify.Follow(FollowType.Artist, new List <string>() { artistId }); return(true); }
public void GenerateArtists_FullArtistsList_ReturnsMenuWithIncrementedTracksAmount() { var followedArtists = _artistsUtils.GetFollowedArtists(); var menu = _artistsGenerator.GenerateArtists(followedArtists); Assert.AreEqual(followedArtists.Count + 1, menu.items.Count); }
public bool FollowedArtists() { var followedArtists = _artistsUtils.GetFollowedArtists(); var artistsMenu = _artistsGenerator.GenerateArtists(followedArtists); bool running = true; while (running) { running = artistsMenu.Display(); } return(true); }
public void GetFollowedArtists_ReturnsList() { var followedArtists = _artistsUtils.GetFollowedArtists(); Assert.AreNotEqual(0, followedArtists.Count); }