summaryrefslogtreecommitdiffstats
path: root/prh-commons
diff options
context:
space:
mode:
authorwasala <przemyslaw.wasala@nokia.com>2018-05-23 09:53:41 +0200
committerwasala <przemyslaw.wasala@nokia.com>2018-05-23 12:02:13 +0200
commitb6bc8925a354825545b8527879e0f687b0dbab3a (patch)
tree9325bbf073594ad411576a969efec5212ce9d9d7 /prh-commons
parente6f50c671627adc43e3aeeb3f3656dc8dfc584dd (diff)
Fix sonar issues
Change-Id: I61155448422f0084ac08f294452ac90f5b3454aa Issue-ID: DCAEGEN2-396 Signed-off-by: wasala <przemyslaw.wasala@nokia.com>
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() {