// object body public static HttpAssertionAwaiter ExpectBody(this HttpAssertionAwaiter awaiter, object body, bool useCamelCase = true) => new HttpAssertionAwaiter(awaiter, assertBodyObject(body, useCamelCase));
// headers public static HttpAssertionAwaiter ExpectHeader(this HttpAssertionAwaiter awaiter, string name, string value) => new HttpAssertionAwaiter(awaiter, assertHeader(name, value));
// string body public static HttpAssertionAwaiter ExpectBody(this HttpAssertionAwaiter awaiter, string body) => new HttpAssertionAwaiter(awaiter, assertBodyString(body));
public static HttpAssertionAwaiter ExpectStatus(this HttpAssertionAwaiter awaiter, HttpStatusCode status) => new HttpAssertionAwaiter(awaiter, assertCode((int)status));
public static HttpAssertionAwaiter ExpectBadRequest(this HttpAssertionAwaiter awaiter, BadRequestAction assert) => new HttpAssertionAwaiter(awaiter, assertBadRequest(assert));
// codes public static HttpAssertionAwaiter ExpectStatus(this HttpAssertionAwaiter awaiter, int code) => new HttpAssertionAwaiter(awaiter, assertCode(code));
public static HttpAssertionAwaiter ExpectResponse(this HttpAssertionAwaiter awaiter, ResponseAction assert) => new HttpAssertionAwaiter(awaiter, runCallback(assert));
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; }))); }
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))); }
public static HttpAssertionAwaiter ExpectSchema(this HttpAssertionAwaiter awaiter, string schema) => new HttpAssertionAwaiter(awaiter, assertSchema(schema));