Пример #1
0
        public void GetAlbumTracks_InvalidAlbumId_ThrowsException()
        {
            // Arranage
            string albumId = "123123123123123";
            int    limit   = 10;
            int    offset  = 0;

            // Act
            AlbumTrackPagingObject tracks = JsonConvert.DeserializeObject <AlbumTrackPagingObject>(Spotify.Api.GetAlbumTracks(albumId, limit, offset));

            // Assert is handled by the ExpectedException attribute on the test method.
        }
Пример #2
0
        public void GetAlbumTracks_ValidAlbumId_DeserialisesCorrectly()
        {
            // Arranage
            string albumId = "4aawyAB9vmqN3uQ7FjRGTy";
            int    limit   = 10;
            int    offset  = 0;

            // Act
            AlbumTrackPagingObject tracks = JsonConvert.DeserializeObject <AlbumTrackPagingObject>(Spotify.Api.GetAlbumTracks(albumId, limit, offset));

            // Assert
            Assert.IsNotNull(tracks.Items);
        }