diff options
author | Jim Hahn <jrh3@att.com> | 2019-07-05 10:52:20 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-07-05 12:25:00 -0400 |
commit | e173fc5ab13b095d8f70fd8a8d4d063adeba6e6b (patch) | |
tree | 8e63717c99cfe9f52f905974c8c67fb8a1dece29 /policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java | |
parent | 53f9550501ca1854318c1f552b0aba2e255b6748 (diff) |
Fix sonar issues in policy/endpoints
Sonar fixes, other than code coverage. These changes are disruptive
and will likely cause breakage in a number of policy repos.
Renamed constants.
Moved constants/factories from interfaces to classes.
Change-Id: I182d50320aa6b53e383081af806c60dd2f806cbe
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java')
-rw-r--r-- | policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java index 7e5c3a12..06c16e9c 100644 --- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java +++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java @@ -1,6 +1,8 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +36,7 @@ import org.onap.policy.common.endpoints.parameters.TopicParameterGroup; * @author Ajith Sreekumar (ajith.sreekumar@est.tech) */ public class ParameterUtilsTest { + private static final String SERVERS = ".servers"; /** * Test getTopicProperties from TopicParameterGroup. @@ -49,9 +52,9 @@ public class ParameterUtilsTest { assertEquals(CommonTestData.TOPIC_NAME, topicProperties.getProperty(CommonTestData.TOPIC_INFRA + ".sink.topics")); assertEquals(CommonTestData.TOPIC_SERVER, topicProperties - .getProperty(CommonTestData.TOPIC_INFRA + ".source.topics." + CommonTestData.TOPIC_NAME + ".servers")); + .getProperty(CommonTestData.TOPIC_INFRA + ".source.topics." + CommonTestData.TOPIC_NAME + SERVERS)); assertEquals(CommonTestData.TOPIC_SERVER, topicProperties - .getProperty(CommonTestData.TOPIC_INFRA + ".sink.topics." + CommonTestData.TOPIC_NAME + ".servers")); + .getProperty(CommonTestData.TOPIC_INFRA + ".sink.topics." + CommonTestData.TOPIC_NAME + SERVERS)); } @Test @@ -62,12 +65,12 @@ public class ParameterUtilsTest { assertEquals(CommonTestData.TOPIC_NAME, topicProperties.getProperty(CommonTestData.TOPIC_INFRA + ".source.topics")); assertEquals(CommonTestData.TOPIC_SERVER, topicProperties - .getProperty(CommonTestData.TOPIC_INFRA + ".source.topics." + CommonTestData.TOPIC_NAME + ".servers")); + .getProperty(CommonTestData.TOPIC_INFRA + ".source.topics." + CommonTestData.TOPIC_NAME + SERVERS)); ParameterUtils.updateTopicProperties(topicProperties, "sink", CommonTestData.TOPIC_INFRA, CommonTestData.TOPIC_NAME, Arrays.asList(CommonTestData.TOPIC_SERVER)); assertEquals(CommonTestData.TOPIC_NAME, topicProperties.getProperty(CommonTestData.TOPIC_INFRA + ".sink.topics")); assertEquals(CommonTestData.TOPIC_SERVER, topicProperties - .getProperty(CommonTestData.TOPIC_INFRA + ".sink.topics." + CommonTestData.TOPIC_NAME + ".servers")); + .getProperty(CommonTestData.TOPIC_INFRA + ".sink.topics." + CommonTestData.TOPIC_NAME + SERVERS)); } } |