public void ThenICaptureTheNewPlaylistID() { var jobj = RESTHelpers.GetJObject(ScenarioContext.Current.Get <string>("PlayListJSONResponse")); ScenarioContext.Current.Set <string>(jobj.GetValue("id").ToString(), "NewPlaylistID"); }
public void ThenThePlaylistDetailsAreUpdated() { var response = ScenarioContext.Current.Get <string>("PUTPlayListJSONResponse"); var updatedPlaylistResponse = RESTHelpers.GetJObject(response); updatedPlaylistResponse.GetValue("id").ToString().Should().NotBe(ScenarioContext.Current.Get <string>("NewPlaylistID")); updatedPlaylistResponse.GetValue("public").ToString().Should().Be("False"); updatedPlaylistResponse.GetValue("description").ToString().Should().Be("Updated playlist description"); updatedPlaylistResponse.GetValue("name").ToString().Should().Be("Updated Playlist Name"); }