aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/java/org/onap/policy/distribution/main/TestExceptions.java
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-08-22 14:47:22 +0100
committerLiam Fallon <liam.fallon@est.tech>2023-08-24 14:30:09 +0000
commita354531009fcfe529d08183249601adb6d0adc6e (patch)
treec6386f6056c62c20e1730ddc535fff40aeb1e27f /main/src/test/java/org/onap/policy/distribution/main/TestExceptions.java
parent960773d01db3072b4a57dbd69e911df1af2df47c (diff)
Upgrade policy-distribution to JUnit 5java-17
Issue-ID: POLICY-4805 Change-Id: I47aaed48f3f05c2f1c5814882386e114dbad0443 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'main/src/test/java/org/onap/policy/distribution/main/TestExceptions.java')
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/TestExceptions.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/main/src/test/java/org/onap/policy/distribution/main/TestExceptions.java b/main/src/test/java/org/onap/policy/distribution/main/TestExceptions.java
index 0f5e5023..4a15506e 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/TestExceptions.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/TestExceptions.java
@@ -20,19 +20,19 @@
package org.onap.policy.distribution.main;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import java.io.IOException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class TestExceptions {
+class TestExceptions {
@Test
- public void test() {
- assertNotNull(new PolicyDistributionException("Message"));
- assertNotNull(new PolicyDistributionException("Message", new IOException()));
+ void test() {
+ assertDoesNotThrow(() -> new PolicyDistributionException("Message"));
+ assertDoesNotThrow(() -> new PolicyDistributionException("Message", new IOException()));
- assertNotNull(new PolicyDistributionRuntimeException("Message"));
- assertNotNull(new PolicyDistributionRuntimeException("Message", new IOException()));
+ assertDoesNotThrow(() -> new PolicyDistributionRuntimeException("Message"));
+ assertDoesNotThrow(() -> new PolicyDistributionRuntimeException("Message", new IOException()));
}
}