aboutsummaryrefslogtreecommitdiffstats
path: root/auth/cli-editor/src/main
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-06-13 10:54:26 +0100
committerAdheli Tavares <adheli.tavares@est.tech>2024-06-14 10:02:50 +0000
commite9b746340711ddfccee7ac0f669ace626b1b3d46 (patch)
tree43077652efad7d4e10c6d858e9006eac15dc1041 /auth/cli-editor/src/main
parent70e614910a05b3588902a779e996a9c695c4b3d9 (diff)
Convert junit4 to junit5
Issue-ID: POLICY-5041 Change-Id: I14f9451a7569f6740bcbd84ae3188d2371067cd0 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'auth/cli-editor/src/main')
-rw-r--r--auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
index 5f7bad116..6797ff4e4 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/tosca/ApexCliToscaEditorMain.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2022 Nordix Foundation.
+ * Copyright (C) 2019-2022, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,14 +37,12 @@ import org.slf4j.LoggerFactory;
*
* @author Ajith Sreekumar (ajith.sreekumar@est.tech)
*/
+@Getter
public class ApexCliToscaEditorMain {
private static final Logger LOGGER = LoggerFactory.getLogger(ApexCliToscaEditorMain.class);
- @Getter
private boolean failure;
- private ApexCliToscaParameters parameters;
- private ApexCommandLineEditorMain apexCliEditor;
/**
* Instantiates the Apex CLI Tosca editor.
@@ -56,7 +54,7 @@ public class ApexCliToscaEditorMain {
LOGGER.info("Starting Apex CLI Tosca editor with arguments - {}", argumentString);
final var parser = new ApexCliToscaParameterParser();
- parameters = parser.parse(args);
+ ApexCliToscaParameters parameters = parser.parse(args);
if (parameters.isHelpSet()) {
CliUtils.help(ApexCliToscaEditorMain.class.getName(), parser.getOptions());
return;
@@ -78,7 +76,7 @@ public class ApexCliToscaEditorMain {
cliArgsList.add(policyModelFilePath);
String[] cliArgs = cliArgsList.toArray(new String[cliArgsList.size()]);
- apexCliEditor = new ApexCommandLineEditorMain(cliArgs);
+ ApexCommandLineEditorMain apexCliEditor = new ApexCommandLineEditorMain(cliArgs);
if (apexCliEditor.getErrorCount() == 0) {
LOGGER.info("Apex CLI editor completed execution. Creating the ToscaPolicy using the tosca template"
+ "skeleton file, config file, and policy model created.");
@@ -90,7 +88,7 @@ public class ApexCliToscaEditorMain {
} catch (IOException | CoderException e) {
failure = true;
LOGGER.error("Failed to create the Tosca template using the generated policy model,"
- + "apex config file and the tosca template skeleton file. " + e);
+ + "apex config file and the tosca template skeleton file. {}", e.getMessage());
}
} else {