diff options
author | Krishnakumar Jinka <kris.jinka@samsung.com> | 2018-12-03 09:38:51 +0900 |
---|---|---|
committer | krisjinka <kris.jinka@samsung.com> | 2018-12-04 00:37:16 +0900 |
commit | c01d5ca4f36b21eb4a08db16498a25a3f28351e2 (patch) | |
tree | cf4273a916beb82151dbec3d41b1eccec04979f9 /policy-management/src/test/java/org/onap | |
parent | 5ab81d06125316e6df489e139ccfee9aba4faf3c (diff) |
Fix sonar issue in droolspdf
Modify protocol coder to fix sonar issue about method
params too many. Using existing builder. Address review
comments, replace modified with modification
Issue-ID: POLICY-1251
Change-Id: I67bd753f346108865404b733e7cf6008c2012766
Signed-off-by: krisjinka <kris.jinka@samsung.com>
Diffstat (limited to 'policy-management/src/test/java/org/onap')
-rw-r--r-- | policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java index 28168178..d28f1e52 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java @@ -105,9 +105,14 @@ public class ProtocolCoderToolsetTest { * @param protocolFilter protocol filter */ public void testGsonToolset(JsonProtocolFilter protocolFilter) { - GsonProtocolCoderToolset gsonToolset = new GsonProtocolCoderToolset(JUNIT_PROTOCOL_CODER_TOPIC, CONTROLLER_ID, - this.releaseId.getGroupId(), this.releaseId.getArtifactId(), Triple.class.getCanonicalName(), - protocolFilter, null, 12345678); + GsonProtocolCoderToolset gsonToolset = new GsonProtocolCoderToolset( + EventProtocolParams.builder().topic(JUNIT_PROTOCOL_CODER_TOPIC) + .groupId(this.releaseId.getGroupId()) + .artifactId(this.releaseId.getArtifactId()) + .eventClass(Triple.class.getCanonicalName()) + .protocolFilter(protocolFilter) + .customGsonCoder(null) + .modelClassLoaderHash(12345678), CONTROLLER_ID); Assert.assertNotNull(gsonToolset.getEncoder()); Assert.assertNotNull(gsonToolset.getDecoder()); @@ -130,9 +135,15 @@ public class ProtocolCoderToolsetTest { * @param protocolFilter protocol filter */ public void testJacksonToolset(JsonProtocolFilter protocolFilter) { - JacksonProtocolCoderToolset jacksonToolset = new JacksonProtocolCoderToolset(JUNIT_PROTOCOL_CODER_TOPIC, - CONTROLLER_ID, this.releaseId.getGroupId(), this.releaseId.getArtifactId(), - Triple.class.getCanonicalName(), protocolFilter, null, 12345678); + JacksonProtocolCoderToolset jacksonToolset = new JacksonProtocolCoderToolset( + EventProtocolParams.builder() + .topic(JUNIT_PROTOCOL_CODER_TOPIC) + .groupId(this.releaseId.getGroupId()) + .artifactId(this.releaseId.getArtifactId()) + .eventClass(Triple.class.getCanonicalName()) + .protocolFilter(protocolFilter) + .customJacksonCoder(null) + .modelClassLoaderHash(12345678), CONTROLLER_ID); jacksonToolset.getEncoder().setVisibility(PropertyAccessor.FIELD, Visibility.ANY); jacksonToolset.getDecoder().setVisibility(PropertyAccessor.FIELD, Visibility.ANY); |