public async Task CreateUserPlaylistTest()
        {
            string title = $"Playlist_etoro_{Guid.NewGuid()}";
            var    userPlayListsBefore = await tidlApi.GetUserPlaylists();

            var playlistModel = await tidlApi.CreateUserPlaylist(title);

            Assert.AreEqual(title, playlistModel.Title);
            Assert.AreNotEqual(
                userPlayListsBefore.Items.Length,
                (await tidlApi.GetUserPlaylists()).Items.Length);
            Logger.Log.Info($"Playlist with {title} title successfully created");
        }
Beispiel #2
0
        public async Task E2ETest()
        {
            var userPlaylist = await tidlApi.CreateUserPlaylist($"Etoro_Playlist_{Guid.NewGuid()}");

            Logger.Log.Warn("trackIds hardcoded due to lack of time and loss in the Tidal API forest, " +
                            "probably at the moment of checking it will be gone, but at this point, it's Miles Davis - 2178489" +
                            "and it's perfect");
            var trackIds = new List <int> {
                2178489
            };
            await tidlApi.AddPlaylistTracks(userPlaylist.Uuid, userPlaylist.ETag, trackIds);

            var beforeDelete = await tidlApi.GetPlayListTracks(userPlaylist.Uuid);

            var response = await tidlApi.DeleteAllTracksInPlaylist(userPlaylist.Uuid);

            var afterDelete = await tidlApi.GetPlayListTracks(userPlaylist.Uuid);

            Assert.AreNotEqual(beforeDelete.TotalNumberOfItems, afterDelete.TotalNumberOfItems);
        }