@microsoft.azure/autorest.testserver
Version:
Autorest test server.
22 lines (21 loc) • 1.32 kB
TypeScript
import { RequestExt } from "../server";
export declare const BODY_NOT_EQUAL_ERROR_MESSAGE = "Body provided doesn't match expected body";
export declare const BODY_EMPTY_ERROR_MESSAGE = "Body should exists";
export declare const BODY_NOT_EMPTY_ERROR_MESSAGE = "Body should be empty";
export declare const validateRawBodyEquals: (request: RequestExt, expectedRawBody: string | undefined) => void;
export declare const validateBodyEquals: (request: RequestExt, expectedBody: unknown | undefined) => void;
export declare const validateCoercedDateBodyEquals: (request: RequestExt, expectedBody: unknown | undefined) => void;
export declare const validateBodyEmpty: (request: RequestExt) => void;
export declare const validateBodyNotEmpty: (request: RequestExt) => void;
/**
* Check whether the XML request body is matching the given xml.
*/
export declare const validateXMLBodyEquals: (request: RequestExt, expectedBody: string) => Promise<void>;
/**
* Check whether the request header contains the given name/value pair
*/
export declare const validateHeader: (request: RequestExt, headerName: string, expected: string) => void;
/**
* Check whether the query string contains the given parameter name and value.
*/
export declare const validateQueryParam: (request: RequestExt, paramName: string, expected: string) => void;