Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void GenerateArtists_FullArtistsList_ReturnsMenuWithIncrementedTracksAmount()
        {
            var followedArtists = _artistsUtils.GetFollowedArtists();
            var menu            = _artistsGenerator.GenerateArtists(followedArtists);

            Assert.AreEqual(followedArtists.Count + 1, menu.items.Count);
        }
Ejemplo n.º 3
0
        public bool FollowedArtists()
        {
            var  followedArtists = _artistsUtils.GetFollowedArtists();
            var  artistsMenu     = _artistsGenerator.GenerateArtists(followedArtists);
            bool running         = true;

            while (running)
            {
                running = artistsMenu.Display();
            }

            return(true);
        }
Ejemplo n.º 4
0
        public void GetFollowedArtists_ReturnsList()
        {
            var followedArtists = _artistsUtils.GetFollowedArtists();

            Assert.AreNotEqual(0, followedArtists.Count);
        }