Exemplo n.º 1
0
 public void RosetteResponse_ContentAsJsonTest()
 {
     HttpResponseMessage message = new HttpResponseMessage {
         StatusCode = (HttpStatusCode)200,
         ReasonPhrase = "OK",
         Content = new StringContent(_testJson)
     };
     message.Headers.Add(_testHeaderKey, _testHeaderValue);
     RosetteResponse rr = new RosetteResponse(message);
     Assert.AreEqual(_testJson, rr.ContentAsJson, "RosetteResponse: json mismatch");
 }
Exemplo n.º 2
0
 public void RosetteResponse_ContentTest()
 {
     HttpResponseMessage message = new HttpResponseMessage {
         StatusCode = (HttpStatusCode)200,
         ReasonPhrase = "OK",
         Content = new StringContent(_testJson)
     };
     message.Headers.Add(_testHeaderKey, _testHeaderValue);
     RosetteResponse rr = new RosetteResponse(message);
     # pragma warning disable 618
     Assert.AreEqual(_testItemCount, rr.Content.Count, "RosetteResponse: header mismatch");
     # pragma warning restore 618
 }