コード例 #1
0
        protected override void EstablishContext()
        {
            base.EstablishContext();

            Endpoint      = EndpointCache.GetEndpoint(EndpointAddress.Uri);
            ErrorEndpoint = EndpointCache.GetEndpoint(ErrorEndpointAddress.Uri);
            ErrorEndpoint.Receive(x => null, TimeSpan.Zero);
        }
コード例 #2
0
 public void WhenServerReturns500ItThrows()
 {
     AssertThrows <RamoneException>(
         () => ErrorEndpoint.Get <string>(new { code = 500, description = "Internal Server Error" }),
         (e) => e.Response.StatusCode == HttpStatusCode.InternalServerError);
 }