From 38584a13f606301803a77da4cf4a9efe2caf5eee Mon Sep 17 00:00:00 2001 From: rathnapandi Date: Thu, 31 Oct 2024 20:45:42 -0700 Subject: [PATCH] - Add junit test --- distribution/assembly/dist-release.xml | 149 +++++++++--------- .../apim/setup/impl/ConsolePrinterTest.java | 10 ++ 2 files changed, 85 insertions(+), 74 deletions(-) diff --git a/distribution/assembly/dist-release.xml b/distribution/assembly/dist-release.xml index e96293d74..66a4992ae 100644 --- a/distribution/assembly/dist-release.xml +++ b/distribution/assembly/dist-release.xml @@ -1,78 +1,79 @@ - release - - dir - tar.gz - zip - - true - false - apim-cli-${pom.version} - - - true - - com.github.axway-api-management-plus.apim-cli:apimcli-apim-adapter - com.github.axway-api-management-plus.apim-cli:apimcli-apis - com.github.axway-api-management-plus.apim-cli:apimcli-apps - com.github.axway-api-management-plus.apim-cli:apimcli-organizations - com.github.axway-api-management-plus.apim-cli:apimcli-users - com.github.axway-api-management-plus.apim-cli:apimcli-settings - com.github.axway-api-management-plus.apim-cli:apimcli-tool - - - false - lib - - - false - - - assembly/ - / - - **/* - - - *.formatted - scripts/* - - - - src/main/resources - /lib - - *.xml - - - cacheConfig.xml - - - - assembly/scripts - /scripts - - *.sh - *.bat - - 0755 - unix - - - - - + release + + dir + tar.gz + zip + + true + false + apim-cli-${pom.version} + + + true + + com.github.axway-api-management-plus.apim-cli:apimcli-apim-adapter + com.github.axway-api-management-plus.apim-cli:apimcli-apis + com.github.axway-api-management-plus.apim-cli:apimcli-apps + com.github.axway-api-management-plus.apim-cli:apimcli-organizations + com.github.axway-api-management-plus.apim-cli:apimcli-users + com.github.axway-api-management-plus.apim-cli:apimcli-settings + com.github.axway-api-management-plus.apim-cli:apimcli-tool + + + false + lib + + + false + + + assembly/ + / + + **/* + + + *.formatted + scripts/* + samples/** + + + + src/main/resources + /lib + + *.xml + + + cacheConfig.xml + + + + assembly/scripts + /scripts + + *.sh + *.bat + + 0755 + unix + + + + + - - - ${project.basedir}/.. - - - README.md - LICENSE - CHANGELOG.md - - - + + + ${project.basedir}/.. + + + + LICENSE + + + + diff --git a/modules/settings/src/test/java/com/axway/apim/setup/impl/ConsolePrinterTest.java b/modules/settings/src/test/java/com/axway/apim/setup/impl/ConsolePrinterTest.java index 5acba9e6a..5da8a0d4b 100644 --- a/modules/settings/src/test/java/com/axway/apim/setup/impl/ConsolePrinterTest.java +++ b/modules/settings/src/test/java/com/axway/apim/setup/impl/ConsolePrinterTest.java @@ -104,4 +104,14 @@ public void testConsoleExportGlobalQuota() throws AppException { APIManagerConfig apiManagerConfig = new APIManagerConfig(); exporter.export(apiManagerConfig); } + + @Test + public void testConsoleExportCustomProperties() throws AppException { + String[] args = {"-h", "localhost", "-c", "manager-config.json", "-type", "CUSTOMPROPERTIES"}; + APIManagerSetupExportParams params = (APIManagerSetupExportParams) APIManagerSetupExportCLIOptions.create(args).getParams(); + ExportResult result = new ExportResult(); + APIManagerSetupResultHandler exporter = APIManagerSetupResultHandler.create(ResultHandler.CONSOLE_EXPORTER, params, result); + APIManagerConfig apiManagerConfig = new APIManagerConfig(); + exporter.export(apiManagerConfig); + } }