public async Task GetPlaylists() { IEnumerable <IPlaylist> playlists = await _user.GetPlaylists(); Assert.IsNotNull(playlists, nameof(playlists)); Assert.That(playlists.Count(), Is.GreaterThan(0), "Count"); var firstPlaylist = playlists.First(); Assert.IsNotNull(firstPlaylist, nameof(firstPlaylist)); Assert.That(firstPlaylist.Id, Is.GreaterThan(0), nameof(firstPlaylist.Id)); Assert.IsNotNull(firstPlaylist.Title, nameof(firstPlaylist.Title)); }
public async Task GetPlaylists() { _server.Content = base.GetServerResponse("playlist"); IEnumerable <IPlaylist> playlists = await _user.GetPlaylists(); Assert.IsNotNull(playlists, nameof(playlists)); Assert.AreEqual(3, playlists.Count(), "Count"); var firstPlaylist = playlists.First(); Assert.IsNotNull(firstPlaylist, nameof(firstPlaylist)); Assert.AreEqual(3093783442, firstPlaylist.Id, nameof(firstPlaylist.Id)); Assert.AreEqual("Favourite tracks", firstPlaylist.Title, nameof(firstPlaylist.Title)); }