summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-executor/plugins-executor-jython/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-03-19 12:52:20 +0000
committerliamfallon <liam.fallon@est.tech>2019-03-19 12:52:20 +0000
commitcfcffbce70ddc3083e337f18377c0847f7233caa (patch)
tree991d9b108573d8f33c1296365f270a1e6aaa5057 /plugins/plugins-executor/plugins-executor-jython/src
parent923a9943a1d59a9d1e87d24490eea78fa9869de7 (diff)
Fix checkstyle/Sonar issues on juint/sonar fixes
Recent changes to increase code coverage and fox Sonar bugs have introduced checkstyle and further Sonar issues. This review cleans those up. Issue-ID: POLICY-1523 Change-Id: I829217ef77d52e57f9713cfeee5b122e1f25efbc Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-jython/src')
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java3
4 files changed, 15 insertions, 12 deletions
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java
index 8bfde0aa7..7c5e829a4 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
package org.onap.policy.apex.plugins.executor.jython;
import static org.junit.Assert.assertNotNull;
+
import org.junit.Test;
/**
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
index 2ae41d6e6..76e35e8cc 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jython;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.util.Map;
import java.util.TreeMap;
import org.junit.After;
@@ -105,8 +106,7 @@ public class JythonStateFinalizerExecutorTest {
AxState state = new AxState();
Map<String, AxStateOutput> stateOutputs = new TreeMap<>();
AxArtifactKey triggerKey = new AxArtifactKey("TriggerName", "0.0.1");
- AxStateOutput isMe = new AxStateOutput(new AxReferenceKey(), triggerKey,
- new AxReferenceKey());
+ AxStateOutput isMe = new AxStateOutput(new AxReferenceKey(), triggerKey, new AxReferenceKey());
stateOutputs.put("SelectedOutputIsMe", isMe);
state.setStateOutputs(stateOutputs);
@@ -141,12 +141,12 @@ public class JythonStateFinalizerExecutorTest {
scriptSource = "setattr(executor, 'selectedStateOutputName', 'SelectedOutputIsMe')\n"
+ "returnValue=('' if executor == -1 else True)";
- stateFinalizerLogic.setLogic(scriptSource);
- try {
- jsfe.prepare();
- } catch (Exception jteException) {
- fail("test should not throw an exception here");
- }
+ stateFinalizerLogic.setLogic(scriptSource);
+ try {
+ jsfe.prepare();
+ } catch (Exception jteException) {
+ fail("test should not throw an exception here");
+ }
AxEvent axEvent = new AxEvent(new AxArtifactKey("Event", "0.0.1"));
EnEvent event = new EnEvent(axEvent);
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
index 97af4b154..aec7470fa 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jython;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.util.HashMap;
import java.util.Map;
import org.junit.After;
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
index d54887a65..7874b2315 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jython;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;