summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/mountpoint-registrar/provider/src/test
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2020-08-20 12:48:17 +0200
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2020-08-20 12:48:30 +0200
commit4277231cf397c2fbc12d4f5ca16d51c0f657bb4f (patch)
treed1682f24cdad7beefdb315a808034a4f58c60105 /sdnr/wt/mountpoint-registrar/provider/src/test
parent57976923bf81939fe7cea8c316fa94071612c3ea (diff)
Fix code smells based on SonarCloud report
Bundles mountpoint-registrar and mountpoint-state-provider and also a Junit test case of aapter-manager devicemanager Issue-ID: CCSDK-2671 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> Change-Id: I84324e6433415bdc001d735e17930c2eb63bb439 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/mountpoint-registrar/provider/src/test')
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java3
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java3
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java6
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java6
4 files changed, 4 insertions, 14 deletions
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
index 80e037da6..87a70d795 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/PNFRegistrationConfigTest.java
@@ -32,7 +32,6 @@ public class PNFRegistrationConfigTest {
// @formatter:off
private static final String TESTCONFIG_CONTENT = "[pnfRegistration]\n"
- + "pnfRegConsumerClass=org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPPNFRegVESMsgConsumer\n"
+ "TransportType=HTTPNOAUTH\n"
+ "Protocol=http\n"
+ "username=username\n"
@@ -59,8 +58,6 @@ public class PNFRegistrationConfigTest {
cfg = new ConfigurationFileRepresentation(configFile);
PNFRegistrationConfig pnfCfg = new PNFRegistrationConfig(cfg);
assertEquals("pnfRegistration", pnfCfg.getSectionName());
- assertEquals("org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPPNFRegVESMsgConsumer",
- pnfCfg.getConsumerClass());
assertEquals("HTTPNOAUTH", pnfCfg.getTransportType());
assertEquals("onap-dmap:3904", pnfCfg.getHostPort());
assertEquals("unauthenticated.VES_PNFREG_OUTPUT", pnfCfg.getTopic());
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
index 3caa864d5..f44bebcee 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultConfig.java
@@ -32,7 +32,6 @@ public class TestFaultConfig {
// @formatter:off
private static final String TESTCONFIG_CONTENT = "[fault]\n"
- + "faultConsumerClass=org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPFaultVESMsgConsumer\n"
+ "TransportType=HTTPNOAUTH\n"
+ "Protocol=http\n"
+ "username=username\n"
@@ -60,8 +59,6 @@ public class TestFaultConfig {
cfg = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
FaultConfig faultCfg = new FaultConfig(cfg);
assertEquals("fault", faultCfg.getSectionName());
- assertEquals("org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPFaultVESMsgConsumer",
- faultCfg.getConsumerClass());
assertEquals("HTTPNOAUTH", faultCfg.getTransportType());
assertEquals("onap-dmap:3904", faultCfg.getHostPort());
assertEquals("unauthenticated.SEC_FAULT_OUTPUT", faultCfg.getTopic());
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java
index 7e7bece17..9fb35e6ba 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestFaultNotificationClient.java
@@ -19,12 +19,9 @@
package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
import static org.junit.Assert.assertEquals;
-
import java.io.IOException;
import java.util.Map;
-
import javax.annotation.Nonnull;
-
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.common.http.BaseHTTPResponse;
import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.FaultNotificationClient;
@@ -51,7 +48,8 @@ public class TestFaultNotificationClient extends FaultNotificationClient {
}
@Override
- public @Nonnull BaseHTTPResponse sendRequest(String uri, String method, String body, Map<String, String> headers)
+ @Nonnull
+ public BaseHTTPResponse sendRequest(String uri, String method, String body, Map<String, String> headers)
throws IOException {
System.out.println("In overridden sendRequest in TestFaultNotificationClient");
return new BaseHTTPResponse(200, body);
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java
index 8694963a9..591ed5b24 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestPNFMountPointClient.java
@@ -19,12 +19,9 @@
package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.test;
import static org.junit.Assert.assertEquals;
-
import java.io.IOException;
import java.util.Map;
-
import javax.annotation.Nonnull;
-
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.common.http.BaseHTTPResponse;
import org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.PNFMountPointClient;
@@ -52,7 +49,8 @@ public class TestPNFMountPointClient extends PNFMountPointClient {
}
@Override
- public @Nonnull BaseHTTPResponse sendRequest(String uri, String method, String body, Map<String, String> headers)
+ @Nonnull
+ public BaseHTTPResponse sendRequest(String uri, String method, String body, Map<String, String> headers)
throws IOException {
System.out.println("In overridden sendRequest in TestPNFMountPointClient");
return new BaseHTTPResponse(200, body);