@microfocus/alm-octane-js-rest-sdk
Version:
NodeJS wrapper for the OpenText Core Software Delivery Platform API
32 lines • 1.97 kB
TypeScript
import { AxiosInstance } from 'axios';
import MockAdapter from 'axios-mock-adapter';
export declare class BuildServerResponses {
scope: MockAdapter;
authenticatedCookie: string;
loginCookieName: string;
constructor(requester: AxiosInstance);
withSuccessfulAuthentication(user?: string, password?: string): this;
withUnsuccessfulAuthentication(): this;
withUnsuccessfulGetRequest(uri: string, errorBody: object): this;
withUnsuccessfulDeleteRequest(uri: string, errorBody: object): this;
withUnsuccessfulUpdateRequest(uri: string, errorBody: object): this;
withUnsuccessfulCreateRequest(uri: string, errorBody: object): this;
withGetRequest(uri: string, statusCode: number, replyData?: any): this;
withDeleteRequest(uri: string, statusCode: number): this;
withUpdateRequest(uri: string, statusCode: number, body?: object, replyData?: any): this;
withCreateRequest(uri: string, statusCode: number, body?: object, replyData?: any): this;
withUnauthorizedUpdateRequest(uri: string, body?: object, replyData?: any): this;
withUnauthorizedGetRequest(uri: string): this;
withUnauthorizedDeleteRequest(uri: string): this;
withUnauthorizedCreateRequest(uri: string, body?: object, replyData?: any): this;
withSuccessfulSignOut(): this;
withUnsuccessfulSignOut(): this;
withTokenGetRequest(uri: string, token: string, statusCode: number, replyData?: any): this;
withUnauthorizedTokenGetRequest(uri: string, token: string): this;
withTokenDeleteRequest(uri: string, token: string, statusCode: number): this;
withUnauthorizedTokenDeleteRequest(uri: string, token: string): this;
withTokenUpdateRequest(uri: string, token: string, statusCode: number, body?: object, replyData?: any): this;
withTokenCreateRequest(uri: string, token: string, statusCode: number, body?: object, replyData?: any): this;
build(): MockAdapter;
}
//# sourceMappingURL=requestHandlerTests.d.ts.map