コード例 #1
0
        public void should_not_handle_request_when_content_type_requested_does_not_contain_json()
        {
            Headers.Add("Accept", "text/xml");

            var handler = new JsonHandler();
            handler.CanHandle(HttpContext).ShouldBeFalse();
        }
コード例 #2
0
        public void should_Handle_request_when_content_type_requested_contains_Json()
        {
            Headers.Add("Accept", "application/json");

            var handler = new JsonHandler();
            handler.CanHandle(HttpContext).ShouldBeTrue();
        }