public bool SaveAlbum(string albumId)
        {
            bool isFollowed = _albumsUtils.GetSavedAlbums().Any(album => album.Id == albumId);

            if (isFollowed)
            {
                throw new ArgumentException("Album is already saved.");
            }
            _spotifyApi.Spotify.SaveAlbum(albumId);
            return(true);
        }
Exemple #2
0
        public void GenerateAlbums_FullAlbumList_ReturnsMenuWithIncrementedTracksAmount()
        {
            var savedAlbums = _albumsUtils.GetSavedAlbums();
            var menu        = _albumsGenerator.GenerateAlbums(savedAlbums);

            Assert.AreEqual(savedAlbums.Count + 1, menu.items.Count);
        }
        public bool SavedAlbums()
        {
            var  savedAlbums = _albumsUtils.GetSavedAlbums();
            var  albumsMenu  = _albumsGenerator.GenerateAlbums(savedAlbums);
            bool running     = true;

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

            return(true);
        }
Exemple #4
0
        public void GetSavedAlbums_ReturnsList()
        {
            var savedAlbums = _albumsUtils.GetSavedAlbums();

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