public void ValidJsonGetRequest() { HttpAgent httpAgent = new HttpAgent(serverUrl + "?_status=200&message=Message"); HttpResponse httpResponse = httpAgent.get(); Assert.IsInstanceOf <JsonHttpResponse>(httpResponse); JsonHttpResponse jsonHttpResponse = httpResponse as JsonHttpResponse; Assert.AreEqual(jsonHttpResponse.getValue().Value <String>("message"), "Message"); Assert.AreEqual(httpResponse.isOk(), true); }
public HttpResponse[] getValues() { HttpResponse[] values = new HttpResponse[this.rawJsonArray.Count]; int pos = 0; foreach (JObject rawObject in this.rawJsonArray) { values[pos] = new JsonHttpResponse(rawObject.ToString()); pos++; } return(values); }