Пример #1
0
        public void Remote_can_respond_to_routes()
        {
            var response = new HttpResponseMessage(HttpStatusCode.OK);

            _remote.RespondsTo("/test/some/route", req => response);

            _remote
            .MakeRequest(new HttpRequestMessage {
                RequestUri = new Uri("http://remote/test/some/route")
            })
            .StatusCode
            .ShouldBe(HttpStatusCode.OK);

            _remote.Recieved.First().Response.ShouldBe(response);
        }