Search in sources :

Example 1 with ApplicationExportApp

use of com.axway.apim.appexport.ApplicationExportApp in project apim-cli by Axway-API-Management-Plus.

the class ExportAppTestAction method runTest.

@Override
public ExportResult runTest(TestContext context) {
    AppExportParams params = new AppExportParams();
    addParameters(params, context);
    params.setName(getVariable(context, PARAM_NAME));
    ApplicationExportApp app = new ApplicationExportApp();
    LOG.info("Running " + app.getClass().getSimpleName() + " with params: " + params);
    ExportResult result = app.export(params);
    if (this.getExpectedReturnCode(context) != result.getRc()) {
        throw new ValidationException("Expected RC was: " + this.getExpectedReturnCode(context) + " but got: " + result.getRc());
    }
    return result;
}
Also used : ValidationException(com.consol.citrus.exceptions.ValidationException) ApplicationExportApp(com.axway.apim.appexport.ApplicationExportApp) AppExportParams(com.axway.apim.appexport.lib.AppExportParams) ExportResult(com.axway.apim.lib.ExportResult)

Aggregations

ApplicationExportApp (com.axway.apim.appexport.ApplicationExportApp)1 AppExportParams (com.axway.apim.appexport.lib.AppExportParams)1 ExportResult (com.axway.apim.lib.ExportResult)1 ValidationException (com.consol.citrus.exceptions.ValidationException)1