示例#1
0
        public void Should_patch_with_response([Values("",
                                                       "&query1=query1b&query2=7")] string querystring)
        {
            var result = WebClient.PatchJson <Handler.InputModel, Handler.OutputModel>(
                $"WithResponseUrlAndQueryParams/url1/segment/5?query1=query1&query2=6{querystring}",
                new Handler.InputModel {
                Value = "fark"
            });

            result.Status.ShouldEqual(HttpStatusCode.OK);
            result.Data.Value.ShouldEqual("fark");
            result.Data.Url1.ShouldEqual("url1");
            result.Data.Url2.ShouldEqual(5);
            result.Data.Query1.ShouldEqual("query1");
            result.Data.Query2.ShouldEqual(6);
        }
示例#2
0
 public void Should_patch_with_no_response()
 {
     WebClient.PatchJson("WithNoResponse", new Handler.InputModel())
     .Status.ShouldEqual(HttpStatusCode.NoContent);
 }