aboutsummaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2020-07-24 09:46:36 +0100
committerwaynedunican <wayne.dunican@est.tech>2020-07-27 13:28:30 +0100
commitb2e2d5f8daeefb08873d11de44cb4cfe7cfab03a (patch)
treebe45f7f5bf18fe4a1a1b1b430a4089a1d1a316c2 /testsuites
parentba58c5bad6075f7bc902de80190cc6770a209bb6 (diff)
SONAR assertions apex-pdp
Ensure assertions are present in test cases Issue-ID: POLICY-2706 Change-Id: I3673a7668564401d2136450b0bdd7a013605dd7c Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJava.java10
-rw-r--r--testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJavascript.java9
-rw-r--r--testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJython.java8
-rw-r--r--testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineMvel.java8
4 files changed, 25 insertions, 10 deletions
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJava.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJava.java
index 1bdd0758c..937a89d9d 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJava.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJava.java
@@ -21,6 +21,8 @@
package org.onap.policy.apex.testsuites.integration.executor.engine;
+import static org.assertj.core.api.Assertions.assertThatCode;
+
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
@@ -96,8 +98,10 @@ public class TestApexEngineJava {
* @throws ApexException the apex exception
*/
@Test
- public void testApexEngineJava() throws InterruptedException, IOException, ApexException {
- new TestApexEngine("JAVA", engineParameters);
- new TestApexEngine("JAVA", engineParameters);
+ public void testApexEngineJava() {
+ assertThatCode(() -> {
+ new TestApexEngine("JAVA", engineParameters);
+ new TestApexEngine("JAVA", engineParameters);
+ }).doesNotThrowAnyException();
}
}
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJavascript.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJavascript.java
index a06c49f7a..108416bca 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJavascript.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJavascript.java
@@ -21,6 +21,8 @@
package org.onap.policy.apex.testsuites.integration.executor.engine;
+import static org.assertj.core.api.Assertions.assertThatCode;
+
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
@@ -95,8 +97,9 @@ public class TestApexEngineJavascript {
*/
@Test
public void testApexEngineJavascript() throws ApexException, InterruptedException, IOException {
-
- new TestApexEngine("JAVASCRIPT", engineParameters);
- new TestApexEngine("JAVASCRIPT", engineParameters);
+ assertThatCode(() -> {
+ new TestApexEngine("JAVASCRIPT", engineParameters);
+ new TestApexEngine("JAVASCRIPT", engineParameters);
+ }).doesNotThrowAnyException();
}
}
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJython.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJython.java
index f62c7e3e7..76b3835a1 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJython.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineJython.java
@@ -21,6 +21,8 @@
package org.onap.policy.apex.testsuites.integration.executor.engine;
+import static org.assertj.core.api.Assertions.assertThatCode;
+
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
@@ -98,7 +100,9 @@ public class TestApexEngineJython {
*/
@Test
public void testApexEngineJython() throws ApexException, InterruptedException, IOException {
- new TestApexEngine("JAVASCRIPT", engineParameters);
- new TestApexEngine("JAVASCRIPT", engineParameters);
+ assertThatCode(() -> {
+ new TestApexEngine("JAVASCRIPT", engineParameters);
+ new TestApexEngine("JAVASCRIPT", engineParameters);
+ }).doesNotThrowAnyException();
}
}
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineMvel.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineMvel.java
index bb24ed9e7..499dc59d9 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineMvel.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/engine/TestApexEngineMvel.java
@@ -21,6 +21,8 @@
package org.onap.policy.apex.testsuites.integration.executor.engine;
+import static org.assertj.core.api.Assertions.assertThatCode;
+
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
@@ -95,7 +97,9 @@ public class TestApexEngineMvel {
*/
@Test
public void testApexEngineMvel() throws ApexException, InterruptedException, IOException {
- new TestApexEngine("MVEL", engineParameters);
- new TestApexEngine("MVEL", engineParameters);
+ assertThatCode(() -> {
+ new TestApexEngine("MVEL", engineParameters);
+ new TestApexEngine("MVEL", engineParameters);
+ }).doesNotThrowAnyException();
}
}