aboutsummaryrefslogtreecommitdiffstats
path: root/datarouter-node/src/test/java/org/onap
diff options
context:
space:
mode:
authorArindam Mondal <arind.mondal@samsung.com>2019-04-19 18:08:21 +0900
committerConor Ward <conor.ward@est.tech>2019-05-01 11:59:25 +0000
commit8d97ad4cf9b468d22e435537a8a9f2946205f35a (patch)
tree01e45dce5157fd4f80a1acba46b87b203162a621 /datarouter-node/src/test/java/org/onap
parent359b6660ad7ec2ce1f458996d14f6e52edda5a4b (diff)
Sonar fix too many method param
+) https://sonar.onap.org/issues?projectUuids=AWHFaQXIWid2ybiDeOSb&resolved=false&rules=squid%3AS00107 ++) code format Issue-ID: DMAAP-1174 Change-Id: I162ed1400be2ac059b14f16500bc849f6b10f8be Signed-off-by: arind.mondal <arind.mondal@samsung.com>
Diffstat (limited to 'datarouter-node/src/test/java/org/onap')
-rw-r--r--datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTest.java5
-rw-r--r--datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigTest.java11
2 files changed, 11 insertions, 5 deletions
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTest.java
index efa43e11..08120073 100644
--- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTest.java
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/DeliveryTest.java
@@ -97,7 +97,10 @@ public class DeliveryTest {
private DestInfo[] createDestInfoObjects() {
DestInfo[] destInfos = new DestInfo[1];
- DestInfo destInfo = new DestInfo("node.datarouternew.com", "spool/s/0/1", "1", "logs/", "/subs/1", "user1", "Basic dXNlcjE6cGFzc3dvcmQx", false, true, false, false, false);
+ DestInfo destInfo = new DestInfo.DestInfoBuilder().setName("node.datarouternew.com").setSpool("spool/s/0/1").setSubid("1")
+ .setLogdata("logs/").setUrl("/subs/1").setAuthuser("user1").setAuthentication("Basic dXNlcjE6cGFzc3dvcmQx")
+ .setMetaonly(false).setUse100(true).setPrivilegedSubscriber(false).setFollowRedirects(false)
+ .setDecompress(false).createDestInfo();
destInfos[0] = destInfo;
return destInfos;
}
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigTest.java
index 7dddd67a..5e357373 100644
--- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigTest.java
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeConfigTest.java
@@ -36,7 +36,8 @@ import java.io.Reader;
import java.io.StringReader;
@RunWith(PowerMockRunner.class)
-@SuppressStaticInitializationFor({"org.onap.dmaap.datarouter.node.ProvData", "org.onap.dmaap.datarouter.node.NodeUtils"})
+@SuppressStaticInitializationFor({"org.onap.dmaap.datarouter.node.ProvData",
+ "org.onap.dmaap.datarouter.node.NodeUtils"})
public class NodeConfigTest {
private static NodeConfig nodeConfig;
@@ -72,7 +73,7 @@ public class NodeConfigTest {
}
@Test
- public void Given_SubId_Then_Get_Feed_Id_Returns_Correct_Id() {
+ public void Given_SubId_Then_Get_Feed_Id_Returns_Correct_Id(){
String feedId = nodeConfig.getFeedId("1");
Assert.assertEquals("1", feedId);
}
@@ -134,13 +135,15 @@ public class NodeConfigTest {
@Test
public void Given_Same_Ip_Then_Is_Another_Node_Returns_False() {
- Boolean isAnotherNode = nodeConfig.isAnotherNode("Basic MTcyLjAuMC40OmtCTmhkWVFvbzhXNUphZ2g4T1N4Zmp6Mzl1ND0=", "172.0.0.1");
+ Boolean isAnotherNode =
+ nodeConfig.isAnotherNode("Basic MTcyLjAuMC40OmtCTmhkWVFvbzhXNUphZ2g4T1N4Zmp6Mzl1ND0=", "172.0.0.1");
Assert.assertFalse(isAnotherNode);
}
@Test
public void Given_Different_Ip_Then_Is_Another_Node_Returns_True() {
- Boolean isAnotherNode = nodeConfig.isAnotherNode("Basic MTcyLjAuMC40OmtCTmhkWVFvbzhXNUphZ2g4T1N4Zmp6Mzl1ND0=", "172.0.0.4");
+ Boolean isAnotherNode =
+ nodeConfig.isAnotherNode("Basic MTcyLjAuMC40OmtCTmhkWVFvbzhXNUphZ2g4T1N4Zmp6Mzl1ND0=", "172.0.0.4");
Assert.assertTrue(isAnotherNode);
}