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); }
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); }
public void GetSavedAlbums_ReturnsList() { var savedAlbums = _albumsUtils.GetSavedAlbums(); Assert.AreNotEqual(0, savedAlbums.Count); }