Skip to content

Instantly share code, notes, and snippets.

@jharmn
Created January 12, 2013 02:22
Show Gist options
  • Select an option

  • Save jharmn/4515722 to your computer and use it in GitHub Desktop.

Select an option

Save jharmn/4515722 to your computer and use it in GitHub Desktop.
[When(@"I retrieve the results")]
public void WhenRetrieveTheResults()
{
try
{
this.content = wc.DownloadString(url);
this.httpStatus = HttpStatusCode.OK;
}
catch (WebException we)
{
this.httpStatus = ((HttpWebResponse)we.Response).StatusCode;
}
if (this.httpStatus.Equals(HttpStatusCode.OK))
{
Assert.IsNotNullOrEmpty(this.content);
this.response = (JObject)JToken.Parse(this.content);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment