UNPKG

@apistudio/apim-cli

Version:

CLI for API Management Products

51 lines 4.54 kB
/** * Copyright Super iPaaS Integration LLC, an IBM Company 2024 */ export declare class AssertConstants { static readonly equals_template = "pm.test('${name}', function () { pm.expect(pm.response.${key}).to.equals(${value}); });"; static readonly not_equals_template = "pm.test('${name}', function () { pm.expect(pm.response.${key}).to.not.equals(${value});});"; static readonly h_equals_template = "pm.test('${name}', function () { pm.expect(pm.response.headers.get('${key}')).to.equals(${value}); });"; static readonly h_not_equals_template = "pm.test('${name}', function () { pm.expect(pm.response.headers.get('${key}')).to.not.equals(${value});});"; static readonly have_property_template = "pm.test('${name}', function () { pm.expect(pm.response.${key}).to.have.property(${value});});"; static readonly not_have_property_template = "pm.test('${name}', function () { pm.expect(pm.response.${key}).to.not.have.property(${value});});"; static readonly h_have_property_template = "pm.test('${name}', function () { pm.expect(pm.response.headers.get(${value})).exist;});"; static readonly h_not_have_property_template = "pm.test('${name}', function () { pm.expect(pm.response.headers.get(${value})).not.exist;});"; static readonly x_have_property_template = " pm.test('${name}', function () { var xmlResponse = pm.response.text(); xml2js.parseString(xmlResponse, function (err, result) { pm.expect(result.${key}).to.have.property(${value});});});"; static readonly x_not_have_property_template = "pm.test('${name}', function () { var xmlResponse = pm.response.text(); xml2js.parseString(xmlResponse, function (err, result) { pm.expect(result.${key}).to.not.have.property(${value});});});"; static readonly lessThan_template = "pm.test('${name}', function () { pm.expect(pm.response.${key}).to.be.lessThan(${value});});"; static readonly greaterThan_template = "pm.test('${name}', function () { pm.expect(pm.response.${key}).to.be.greaterThan(${value});});"; static readonly validateSchema_template = "pm.test('${name}', function () { pm.response.to.have.jsonSchema(${value});});"; static readonly inValidateSchema_template = "pm.test('${name}', function () { pm.response.to.not.have.jsonSchema(${value});});"; static readonly x_equals_template = "pm.test('${name}', function () { var xmlResponse = pm.response.text(); xml2js.parseString(xmlResponse, function (err, result) { pm.expect(result.${key}).to.eql(${value});});});"; static readonly x_not_equals_template = "pm.test('${name}', function () { var xmlResponse = pm.response.text(); xml2js.parseString(xmlResponse, function (err, result) { pm.expect(result.${key}).to.not.eql(${value});});});"; static readonly have_lengthOf_template = "pm.test('${name}', function () { pm.expect(pm.response.${key}).to.have.lengthOf(${value});});"; static readonly include_template = "pm.test('${name}', function () { pm.expect(pm.response.${key}).to.include(${value}); });"; static readonly common_template = "const xml2js = require('xml2js');"; static readonly equals_action = "equals"; static readonly not_equals_action = "notEquals"; static readonly h_equals_action = "h_equals"; static readonly h_not_equals_action = "h_notEquals"; static readonly x_equals_action = "x_equals"; static readonly x_not_equals_action = "x_notEquals"; static readonly have_property_action = "haveProperty"; static readonly not_have_property_action = "notHaveProperty"; static readonly h_have_property_action = "h_haveProperty"; static readonly h_not_have_property_action = "h_notHaveProperty"; static readonly x_have_property_action = "x_haveProperty"; static readonly x_not_have_property_action = "x_notHaveProperty"; static readonly lessThan_action = "lessThan"; static readonly greaterThan_action = "greaterThan"; static readonly validateSchema_action = "validateSchema"; static readonly inValidateSchema_action = "inValidateSchema"; static readonly lengthOf_action = "lengthOf"; static readonly include_action = "include"; static readonly responseJsonTypeKey = "json()"; static readonly responseHeaderKey = "header()"; static readonly responseXmlTypeKey = "xml()"; static readonly responseTextTypeKey = "text()"; static readonly keyPlaceHolder = "${key}"; static readonly valuePlaceHolder = "${value}"; static readonly namePlaceHolder = "${name}"; static readonly singleQuote = "'"; } //# sourceMappingURL=assertConstants.d.ts.map