summaryrefslogtreecommitdiffstats
path: root/tools/model-generator/src/test
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 /tools/model-generator/src/test
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 'tools/model-generator/src/test')
-rw-r--r--tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java3
-rw-r--r--tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
index 1263dc4fd..24a9f60ce 100644
--- a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
@@ -21,6 +21,7 @@
package org.onap.policy.apex.tools.model.generator.model2cli;
+import static org.assertj.core.api.Assertions.assertThatCode;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
@@ -37,7 +38,7 @@ public class Model2CliTest {
public void testModel2Cli() {
final String[] cliArgs = {"-h"};
- Model2CliMain.main(cliArgs);
+ assertThatCode(() -> Model2CliMain.main(cliArgs)).doesNotThrowAnyException();
}
@Test
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java
index 58c860d1c..5e2b05124 100644
--- a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java
@@ -21,6 +21,7 @@
package org.onap.policy.apex.tools.model.generator.model2event;
+import static org.assertj.core.api.Assertions.assertThatCode;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
@@ -38,7 +39,7 @@ public class Model2EventTest {
final String[] EventArgs =
{ "-h" };
- Model2EventMain.main(EventArgs);
+ assertThatCode(() -> Model2EventMain.main(EventArgs)).doesNotThrowAnyException();
}