///
import * as cad from "../../lib/api";
export type GetRequestInvokerDelegate = () => Promise;
export type PostRequestInvokerDelegate = (inputStream: Buffer) => Promise;
/**
* API tester base class.
*/
export declare abstract class ApiTester {
/**
* The default timeout (ms)
*/
static readonly DefaultTimeout: number;
/**
* If any test failed
*/
protected static FailedAnyTest: boolean;
/**
* The server access file
*/
protected readonly ServerAccessFile: string;
/**
* The API version
*/
protected readonly ApiVersion: string;
/**
* The base URL
*/
protected readonly BaseUrl: string;
/**
* The local test folder
*/
protected readonly LocalTestFolder: string;
/**
* The default cloud storage
*/
protected readonly DefaultStorage: string;
/**
* The basic export formats
*/
protected readonly BasicExportFormats: string[];
/**
* The basic export formats
*/
protected readonly BasicCadExportFormats: string[];
/**
* Cloud test folder prefix.
*/
protected readonly CloudTestFolderPrefix: string;
/**
* Original data folder.
*/
protected readonly OriginalDataFolder: string;
/**
* Reference data folder.
*/
protected readonly ReferenceDataFolder: string;
/**
* Ovveride reference file.
*/
protected readonly OverrideReference: boolean;
/**
* Gets or sets a value indicating whether resulting images should be removed from cloud storage.
*/
protected RemoveResult: boolean;
/**
* Input test files info
*/
protected InputTestFiles: cad.StorageFile[];
/**
* Dynamic temp folder name.
*/
protected TempFolder: string;
/**
* Current test storage
*/
protected TestStorage: string;
/**
* Aspose.CAD Cloud API
*/
protected cadApi: cad.CadApi;
/**
* Setup method
*/
beforeAll(): Promise;
/**
* Teardown method
*/
afterAll(): Promise;
/**
* Creates folder using Promise to call Storage SDK.
* @param downloadPath Storage folder path.
* @param storage Storage name.
*/
protected putCreateFolderAsync(folder: string, storage: string): Promise;
/**
* Deletes folder using Promise to call Storage SDK.
* @param folder Storage folder.
* @param storage Storage name.
*/
protected deleteFolderAsync(folder: string, storage: string): Promise;
/**
* Gets existence status of path using Promise to call Storage SDK.
* @param outPath Storage path to check.
* @param storage Storage name.
*/
protected getIsExistAsync(outPath: string, storage: string): Promise;
/**
* Creates the API instances using given access parameters.
*/
protected createApiInstances(): Promise;
/**
* Get files from the cloud.
*/
protected fetchInputTestFiles(): Promise;
/**
* Creates folders for working in the cloud.
*/
protected initializeFolders(): Promise;
/**
* Checks if input file exists
* @param inputFileName Input file name
*/
protected checkInputFileExists(inputFileName: string): boolean;
/**
* Gets the storage file information.
* @param folder The folder which contains a file.
* @param fileName Name of the file.
* @param storage The storage.
*/
protected getStorageFileInfo(folder: string, fileName: string, storage: string): Promise;
/**
* Tests the typical GET request.
* @param testMethodName Name of the test method.
* @param parametersLine The parameters line.
* @param inputFileName Name of the input file.
* @param requestInvoker The request invoker.
* @param propertiesTester The properties tester.
* @param folder folder with file.
* @param outPath The out path.
* @param resultFileName Result file name.
* @param storage The storage.
*/
protected testGetRequest(testMethodName: string, parametersLine: string, inputFileName: string, requestInvoker: GetRequestInvokerDelegate, folder: string, outPath: string, resultFileName: string, storage?: string): Promise;
/**
* Tests the typical POST request.
* @param testMethodName Name of the test method.
* @param parametersLine The parameters line.
* @param inputFileName Name of the input file.
* @param requestInvoker The request invoker.
* @param propertiesTester The properties tester.
* @param folder The folder with file.
* @param outPath The out path.
* @param resultFileName Result file name.
* @param storage The storage.
*/
protected testPostRequest(testMethodName: string, parametersLine: string, inputFileName: string, requestInvoker: PostRequestInvokerDelegate, folder: string, outPath: string, resultFileName: string, storage?: string): Promise;
/**
* Tests the typical PUT request.
* @param testMethodName Name of the test method.
* @param parametersLine The parameters line.
* @param inputFileName Name of the input file.
* @param requestInvoker The request invoker.
* @param propertiesTester The properties tester.
* @param folder The folder with file.
* @param outPath The out path.
* @param resultFileName Result file name.
* @param storage The storage.
*/
protected testPutRequest(testMethodName: string, parametersLine: string, inputFileName: string, requestInvoker: PostRequestInvokerDelegate, folder: string, outPath: string, resultFileName: string, storage?: string): Promise;
/**
* Downloads file using Promise to call Storage SDK.
* @param downloadPath Storage file path.
* @param storage Storage name.
*/
protected getDownloadAsync(downloadPath: string, storage: string): Promise;
/**
* Copies input file to temp folder using Promises to call Storage SDK.
* @param fileName File to copy.
* @param destFolder Destination folder.
* @param storage Storage name.
*/
protected copyFileAsync(fileName: string, destFileName: string, destFolder: string, storage: string): Promise;
/**
* Deletes file using Promise to call Storage SDK.
* @param file Storage file path.
* @param storage Storage name.
*/
protected deleteFileAsync(file: string, storage: string): Promise;
/**
* Obtains the typical GET request response.
* @param requestInvoker The output path to save the result.
*/
private obtainGetResponse;
/**
* Obtains the typical POST request response.
* @param inputPath The input path.
* @param outPath The output path to save the result.
* @param storage The storage.
* @param requestInvoker The request invoker.
*/
private obtainPostResponse;
/**
* Fetches the input test files info.
*/
private fetchInputTestFilesInfo;
/**
* Tests the typical request.
* @param testMethodName Name of the test method.
* @param saveResultToStorage If set to true, save result to storage.
* @param parametersLine The parameters line.
* @param inputFileName Name of the input file.
* @param resultFileName Name of the result file.
* @param invokeRequestAction The invoke request action.
* @param propertiesTester The properties tester.
* @param outPath The output path.
* @param storage The storage.
*/
private testRequest;
}