summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-07-06 14:18:56 +0000
committerGerrit Code Review <gerrit@onap.org>2021-07-06 14:18:56 +0000
commit66338d3e8b16016def6aff84ae35ed5d7947ac8c (patch)
treedfb898b55a46db0bae3ebe8823eb15c651c17833
parent64157fdb3e5d30c4a979c71b18bb0c28f562b405 (diff)
parent3ec3c4ab17a52022e04535ddbaf66b6373bb9492 (diff)
Merge "Convert clamp-common unit tests to JUnit 5"
-rw-r--r--common/src/test/java/org/onap/policy/clamp/controlloop/common/exception/ExceptionsTest.java6
-rw-r--r--common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java6
-rw-r--r--common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/common/src/test/java/org/onap/policy/clamp/controlloop/common/exception/ExceptionsTest.java b/common/src/test/java/org/onap/policy/clamp/controlloop/common/exception/ExceptionsTest.java
index 3c1688582..6d39337f7 100644
--- a/common/src/test/java/org/onap/policy/clamp/controlloop/common/exception/ExceptionsTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/controlloop/common/exception/ExceptionsTest.java
@@ -27,16 +27,16 @@ import static org.junit.Assert.assertNotNull;
import java.io.IOException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.errors.concepts.ErrorResponse;
-public class ExceptionsTest {
+class ExceptionsTest {
private static final String STRING_TEXT = "String";
private static final String MESSAGE = "Message";
@Test
- public void testExceptions() {
+ void testExceptions() {
assertNotNull(new ControlLoopException(Response.Status.OK, MESSAGE));
assertNotNull(new ControlLoopException(Response.Status.OK, MESSAGE, STRING_TEXT));
assertNotNull(new ControlLoopException(Response.Status.OK, MESSAGE, new IOException()));
diff --git a/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java b/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
index 845bc8df0..7a0479d29 100644
--- a/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
@@ -24,14 +24,14 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
-public class ControlLoopHandlerTest {
+class ControlLoopHandlerTest {
@Test
- public void testControlLoopHandler() {
+ void testControlLoopHandler() {
assertThatThrownBy(() -> new DummyControlLoopHandler(null)).isInstanceOf(NullPointerException.class);
assertNotNull(new DummyControlLoopHandler(new PolicyModelsProviderParameters()));
diff --git a/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java b/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
index 2d30592e4..715232f58 100644
--- a/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
@@ -28,7 +28,7 @@ import org.apache.commons.cli.Options;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-public class CommonCommandLineArgumentsTest {
+class CommonCommandLineArgumentsTest {
public static CommonCommandLineArguments cli;