Esempio n. 1
0
        public bool SaveTrack(string trackId)
        {
            var  savedTracks = _tracksUtils.GetSavedTracks();
            bool isSaved     = savedTracks.Any(savedTrack => savedTrack.Id == trackId);

            if (isSaved)
            {
                throw new ArgumentException("Track is already saved.");
            }
            _spotifyApi.Spotify.SaveTrack(trackId);
            return(true);
        }
Esempio n. 2
0
        public bool SavedTracks()
        {
            var  savedTracks = _tracksUtils.GetSavedTracks();
            var  tracksMenu  = _tracksGenerator.GenerateTracks(savedTracks);
            bool running     = true;

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

            return(true);
        }
Esempio n. 3
0
        public void GetSavedTracks_ReturnsList()
        {
            var savedTracks = _tracksUtils.GetSavedTracks();

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