diff options
author | liamfallon <liam.fallon@est.tech> | 2021-07-02 11:08:47 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2021-07-02 11:15:22 +0100 |
commit | 3ec3c4ab17a52022e04535ddbaf66b6373bb9492 (patch) | |
tree | da1f6e11a390fa45d956ce18ef325cba01b857dd /common/src | |
parent | 72d882f65031518e9d1b1a6d6e53c7d42ab8495f (diff) |
Convert clamp-common unit tests to JUnit 5
JUnit 4 tests do not fire when JUnit 5 is activated.
Issue-ID: POLICY-3452
Change-Id: I82396f918c69d9c27d0a00fa0e97b3e6b138e951
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'common/src')
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; |