コード例 #1
0
 // object body
 public static HttpAssertionAwaiter ExpectBody(this HttpAssertionAwaiter awaiter, object body, bool useCamelCase = true) =>
 new HttpAssertionAwaiter(awaiter, assertBodyObject(body, useCamelCase));
コード例 #2
0
 // headers
 public static HttpAssertionAwaiter ExpectHeader(this HttpAssertionAwaiter awaiter, string name, string value) =>
 new HttpAssertionAwaiter(awaiter, assertHeader(name, value));
コード例 #3
0
 // string body
 public static HttpAssertionAwaiter ExpectBody(this HttpAssertionAwaiter awaiter, string body) =>
 new HttpAssertionAwaiter(awaiter, assertBodyString(body));
コード例 #4
0
 public static HttpAssertionAwaiter ExpectStatus(this HttpAssertionAwaiter awaiter, HttpStatusCode status) =>
 new HttpAssertionAwaiter(awaiter, assertCode((int)status));
コード例 #5
0
 public static HttpAssertionAwaiter ExpectBadRequest(this HttpAssertionAwaiter awaiter, BadRequestAction assert) =>
 new HttpAssertionAwaiter(awaiter, assertBadRequest(assert));
コード例 #6
0
 // codes
 public static HttpAssertionAwaiter ExpectStatus(this HttpAssertionAwaiter awaiter, int code) =>
 new HttpAssertionAwaiter(awaiter, assertCode(code));
コード例 #7
0
 public static HttpAssertionAwaiter ExpectResponse(this HttpAssertionAwaiter awaiter, ResponseAction assert) =>
 new HttpAssertionAwaiter(awaiter, runCallback(assert));
コード例 #8
0
        public static HttpAssertionAwaiter ExpectSchema <T>(this HttpAssertionAwaiter awaiter, bool useCamelCase = true)
        {
            var run = new Func <Action <T>, ResponseAction>(act => new ResponseAction(m => m.AssertResponseSchema <T>(useCamelCase)));

            return(new HttpAssertionAwaiter(awaiter, run(t => { return; })));
        }
コード例 #9
0
        public static HttpAssertionAwaiter ExpectBody <T>(this HttpAssertionAwaiter awaiter, Action <T> assert)
        {
            var runCallback = new Func <Action <T>, ResponseAction>(act => new ResponseAction(m => m.Run(act)));

            return(new HttpAssertionAwaiter(awaiter, runCallback(assert)));
        }
コード例 #10
0
 public static HttpAssertionAwaiter ExpectSchema(this HttpAssertionAwaiter awaiter, string schema) =>
 new HttpAssertionAwaiter(awaiter, assertSchema(schema));