Ejemplo n.º 1
0
        public void WhenIExecuteAGETTracksRequest()
        {
            IRestResponse response = RESTHelpers.GETWithOAUTH(ConfigurationManager.AppSettings["SpotifyURL"].ToString(),
                                                              ConfigurationManager.AppSettings["TracksResource"].ToString(),
                                                              ScenarioContext.Current.Get <string>("AccountToken"));

            RESTHelpers.Is200OKResponse(response);

            ScenarioContext.Current.Add("TracksJSON", response.Content);
        }
Ejemplo n.º 2
0
        public void ThenTheTrackNoLongerExistsInThePlaylist()
        {
            IRestResponse response = RESTHelpers.GETPlaylist(
                ConfigurationManager.AppSettings["SpotifyURL"].ToString(),
                ConfigurationManager.AppSettings["PlayListResource"].ToString(),
                ConfigurationManager.AppSettings["ModifyToken"]
                );

            RESTHelpers.Is200OKResponse(response);

            response.Content.Contains(ConfigurationManager.AppSettings["DeleteTrackID"]).Should().BeFalse();
        }
Ejemplo n.º 3
0
        public void WhenIRunTheDeleteTrackFromPlaylistRequest()
        {
            IRestResponse response = RESTHelpers.DELETETrackFromPlaylist(
                ConfigurationManager.AppSettings["SpotifyURL"].ToString(),
                ConfigurationManager.AppSettings["PlayListResource"].ToString(),
                ConfigurationManager.AppSettings["ModifyToken"],
                "DELETETrackFromPlaylist.json"
                );

            RESTHelpers.Is200OKResponse(response);

            ScenarioContext.Current.Add("DELETEPlayListTracksJSONResponse", response.Content);
        }