aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/appc
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2024-06-13 09:24:00 +0100
committerwaynedunican <wayne.dunican@est.tech>2024-06-24 16:30:48 +0100
commit7b11ab5c03a438aa29ff2242fa06bb8ff28c2867 (patch)
tree2c76324c1d60b761f09b82fb1786e4633510dbb9 /models-interactions/model-impl/appc
parentbacd5a6f57e79f26d447644329b585991f989123 (diff)
Convert models to JUnit 5
Review for models-impl Issue-ID: POLICY-5042 Change-Id: I22ff90b12da3fb2ba4d0eead7afb9282eac6921f Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'models-interactions/model-impl/appc')
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java14
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java14
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java14
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java14
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java14
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java10
6 files changed, 40 insertions, 40 deletions
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
index 8c00fd5de..72a78147b 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
@@ -3,7 +3,7 @@
* appc
* ================================================================================
* Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,9 +22,9 @@
package org.onap.policy.appc;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.time.Instant;
import java.util.ArrayList;
@@ -32,16 +32,16 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.function.BiConsumer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class CommonHeaderTest {
+class CommonHeaderTest {
private static final String KANSAS = "Kansas";
private static final String DOROTHY = "Dorothy";
private static final String CAN_I_GO_HOME = "Can I go home?";
@Test
- public void testCommonHeader() {
+ void testCommonHeader() {
CommonHeader commonHeader = new CommonHeader();
assertNotNull(commonHeader);
assertNotNull(new CommonHeader(commonHeader));
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java
index bc4429f02..998612426 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java
@@ -3,7 +3,7 @@
* appc
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,15 +21,15 @@
package org.onap.policy.appc;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class EnumsTest {
+class EnumsTest {
@Test
- public void testResponseCode() {
+ void testResponseCode() {
assertEquals(5, ResponseCode.values().length);
assertNull(ResponseCode.toResponseCode(0));
@@ -54,7 +54,7 @@ public class EnumsTest {
}
@Test
- public void testResponseValue() {
+ void testResponseValue() {
assertEquals(5, ResponseValue.values().length);
assertNull(ResponseValue.toResponseValue("Dorothy"));
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
index 52b974c54..7ab4ae746 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
@@ -3,7 +3,7 @@
* appc
* ================================================================================
* Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,22 +22,22 @@
package org.onap.policy.appc;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class RequestTest {
+class RequestTest {
private static final String WIZARD = "Wizard";
private static final String GO_TO_OZ = "Go to Oz";
@Test
- public void testRequest() {
+ void testRequest() {
Request request = new Request();
assertNotNull(request);
assertNotEquals(0, request.hashCode());
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
index cd4e2a697..a13e08f64 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
@@ -3,7 +3,7 @@
* appc
* ================================================================================
* Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,19 +22,19 @@
package org.onap.policy.appc;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class ResponseStatusTest {
+class ResponseStatusTest {
private static final String THERE_S_NO_PLACE_LIKE_HOME = "There's no place like home";
private static final String THE_WONDERFUL_LAND_OF_OZ = "The wonderful land of Oz";
@Test
- public void testResonseStatus() {
+ void testResponseStatus() {
ResponseStatus status = new ResponseStatus();
assertNotNull(status);
assertNotEquals(0, status.hashCode());
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
index 42e5a6d85..ee0ff371b 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
@@ -3,7 +3,7 @@
* appc
* ================================================================================
* Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,18 +22,18 @@
package org.onap.policy.appc;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.HashMap;
import java.util.Map;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class ResponseTest {
+class ResponseTest {
@Test
- public void testResonse() {
+ void testResonse() {
Response response = new Response();
assertNotNull(response);
assertNotNull(new Response(new Request()));
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java
index 93c3c9e04..0bf35bc9c 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java
@@ -3,7 +3,7 @@
* appc
* ================================================================================
* Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,18 +22,18 @@
package org.onap.policy.appc.util;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import com.google.gson.JsonParseException;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class SerializationTest {
+class SerializationTest {
@Test
- public void test() {
+ void test() {
String nameString = "Dorothy";
String jsonName = Serialization.gsonPretty.toJson(nameString, String.class);
assertEquals("\"Dorothy\"", jsonName);