Exemplo n.º 1
0
        private string SerialisePayload(HttpContent httpContent)
        {
            if (httpContent == null)
            {
                return(null);
            }

            var objectContent = (ObjectContent)httpContent;

            return(_configuration.JsonSerialiser(objectContent.Content));
        }
Exemplo n.º 2
0
 public void it_should_configure_json_serialiser()
 {
     _handlerConfiguration.JsonSerialiser("Test").ShouldBe("\"Test\"");
 }
Exemplo n.º 3
0
        private string SerialisePayload(HttpResponseMessage responseMessage)
        {
            var objectContent = (ObjectContent)responseMessage.Content;

            return(_configuration.JsonSerialiser(objectContent.Content));
        }
Exemplo n.º 4
0
 public void it_should_configure_json_serialiser()
 {
     _handlerConfiguration.JsonSerialiser(new {}).ShouldBe("{}");
 }