summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/appc/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-17 17:35:26 -0400
committerJim Hahn <jrh3@att.com>2021-06-17 17:52:40 -0400
commitcad8b87bffb3b10c67f8b68ce8fcee5e5a3dcc35 (patch)
tree22748439c4a9c81bfb10e82577448e397f6c3996 /models-interactions/model-impl/appc/src/test
parent27ac6bce15318a074d4fb53606571eb30e46bf07 (diff)
Use lombok annotations for aai, appc, appclcm, cds
Issue-ID: POLICY-3396 Change-Id: I81b6b0c7929809ffaeadadd6144e9b9f394bfdc8 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-impl/appc/src/test')
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java3
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java3
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java5
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java5
4 files changed, 10 insertions, 6 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 686e6a416..8c00fd5de 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
@@ -21,6 +21,7 @@
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;
@@ -73,7 +74,7 @@ public class CommonHeaderTest {
assertNotEquals(0, commonHeader.hashCode());
- assertEquals("CommonHeader [TimeStamp=", commonHeader.toString().substring(0, 24));
+ assertThat(commonHeader.toString()).startsWith("CommonHeader(timeStamp=");
CommonHeader copiedCommonHeader = new CommonHeader();
copiedCommonHeader.setApiVer(commonHeader.getApiVer());
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 5bff56b78..52b974c54 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
@@ -21,6 +21,7 @@
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;
@@ -64,7 +65,7 @@ public class RequestTest {
assertNotEquals(0, request.hashCode());
- assertEquals("Request [CommonHeader=CommonHeader [TimeStamp=", request.toString().substring(0, 46));
+ assertThat(request.toString()).startsWith("Request(commonHeader=CommonHeader(timeStamp=");
Request copiedRequest = new Request();
copiedRequest.setCommonHeader(request.getCommonHeader());
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 c79062594..cd4e2a697 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
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* appc
* ================================================================================
- * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,6 +21,7 @@
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;
@@ -48,7 +49,7 @@ public class ResponseStatusTest {
assertEquals(THERE_S_NO_PLACE_LIKE_HOME, status.getValue());
assertNotEquals(0, status.hashCode());
- assertEquals("ResponseStatus [Code=1234, Value=There's no pla", status.toString().substring(0, 47));
+ assertThat(status.toString()).startsWith("ResponseStatus(code=1234, value=There's no pla");
ResponseStatus copiedStatus = new ResponseStatus();
copiedStatus.setCode(status.getCode());
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 9e20331f9..42e5a6d85 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
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* appc
* ================================================================================
- * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,6 +21,7 @@
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;
@@ -60,7 +61,7 @@ public class ResponseTest {
assertNotEquals(0, response.hashCode());
- assertEquals("Response [CommonHeader=CommonHeader [TimeStamp=", response.toString().substring(0, 47));
+ assertThat(response.toString()).startsWith("Response(commonHeader=CommonHeader(timeStamp=");
Response copiedResponse = new Response();
copiedResponse.setCommonHeader(response.getCommonHeader());