summaryrefslogtreecommitdiffstats
path: root/prh-commons
diff options
context:
space:
mode:
Diffstat (limited to 'prh-commons')
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java18
-rw-r--r--prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java2
2 files changed, 13 insertions, 7 deletions
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java
index 9e272aae..7b48bd80 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelForUnitTest.java
@@ -22,21 +22,27 @@ package org.onap.dcaegen2.services.prh.model;
public class ConsumerDmaapModelForUnitTest implements ConsumerDmaapModel {
- private final String PNF_NAME = "NOKnhfsadhff";
- private final String IPv4 = "256.22.33.155";
- private final String IPv6 = "2001:0db8:85a3:0000:0000:8a2e:0370:7334";
+ private final String pnfName;
+ private final String ipv4;
+ private final String ipv6;
+ public ConsumerDmaapModelForUnitTest() {
+ this.pnfName = "NOKnhfsadhff";
+ this.ipv4 = "256.22.33.155";
+ this.ipv6 = "2001:0db8:85a3:0000:0000:8a2e:0370:7334";
+
+ }
public String getPnfName() {
- return PNF_NAME;
+ return pnfName;
}
public String getIpv4() {
- return IPv4;
+ return ipv4;
}
public String getIpv6() {
- return IPv6;
+ return ipv6;
}
}
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java
index 6f99f1c7..3981901e 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
public class CommonFunctionsTest {
private ConsumerDmaapModel model = new ConsumerDmaapModelForUnitTest();
- private String expectedResult = "{\"PNF_NAME\":\"NOKnhfsadhff\",\"IPv4\":\"256.22.33.155\",\"IPv6\":\"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"}";
+ private String expectedResult = "{\"pnfName\":\"NOKnhfsadhff\",\"ipv4\":\"256.22.33.155\",\"ipv6\":\"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"}";
@Test
public void createJsonBody_shouldReturnJsonInString() {