Пример #1
0
        public void GetAlbum()
        {
            GetArtists ar = new GetArtists()
            {
                Credentials = c
            };

            var response = ar.DoRequest<GetArtistsResponse>().GetAwaiter().GetResult();

            GetArtist a = new GetArtist(response.artists.index[0].artist[0].id)
            {
                Credentials = c
            };

            var response2 = a.DoRequest<GetArtistResponse>().GetAwaiter().GetResult();

            //Arrange
            GetAlbum al = new GetAlbum(response2.artist.album[0].id)
            {
                Credentials = c
            };

            //Act
            var response3 = al.DoRequest<GetAlbumResponse>().GetAwaiter().GetResult();

            //Assert
            Assert.AreEqual<string>(expected, response3.status);
        }
Пример #2
0
        public void GetTopSongs()
        {
            GetArtists ar = new GetArtists()
            {
                Credentials = c
            };

            var response = ar.DoRequest<GetArtistsResponse>().GetAwaiter().GetResult();
            //Arrange
            GetTopSongs ss = new GetTopSongs(response.artists.index[0].artist[0].name)
            {
                Credentials = c
            };
            //Act
            var response2 = ss.DoRequest<GetTopSongsResponse>().GetAwaiter().GetResult();
            //Assert
            Assert.AreEqual<string>(expected, response2.status);
        }
Пример #3
0
        public void GetArtists()
        {
            //Arrange
            GetArtists a = new GetArtists()
            {
                Credentials = c
            };

            //Act
            var response = a.DoRequest<GetArtistsResponse>().GetAwaiter().GetResult();

            //Assert
            Assert.AreEqual<string>(expected, response.status);
        }
Пример #4
0
        public void GetArtistInfo2()
        {
            GetArtists ar = new GetArtists()
            {
                Credentials = c
            };

            var response = ar.DoRequest<GetArtistsResponse>().GetAwaiter().GetResult();
            //Arrange
            GetArtistInfo2 ai = new GetArtistInfo2(response.artists.index[0].artist[0].id)
            {
                Credentials = c
            };
            //Act
            var response2 = ai.DoRequest<GetArtistInfo2Response>().GetAwaiter().GetResult();
            //Assert
            Assert.AreEqual<string>(expected, response2.status);
        }