summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.test/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-07-21 09:55:38 -0400
committerJim Hahn <jrh3@att.com>2020-07-21 16:25:53 -0400
commit248a660d61fa03caa4710cf8cfe144eb245b807b (patch)
tree9f7c9aa7fda6d9ab9977bf2398a0136a787dc62a /models-interactions/model-actors/actor.test/src/main
parentf203526d0f86d385976da394bd1f0f918e4445d9 (diff)
Fix some sonars in policy-models
Fixed the following sonar issues in some of the project directories: - use assertNull, assertEquals, etc. - swap assertEquals arguments - extract a constant - don't invoke toString() in logger calls - TODOs - generic types Issue-ID: POLICY-2714 Change-Id: Id8803f9bf617ea9fc173a67b8606600709b55bdc Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.test/src/main')
-rw-r--r--models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java10
-rw-r--r--models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java4
2 files changed, 6 insertions, 8 deletions
diff --git a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java
index c8b69677f..fc4545966 100644
--- a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java
+++ b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java
@@ -45,8 +45,10 @@ import org.onap.policy.simulators.Util;
/**
* Superclass for various BidirectionalTopicOperation tests.
+ *
+ * @param <Q> request type
*/
-public abstract class BasicBidirectionalTopicOperation extends BasicOperation {
+public abstract class BasicBidirectionalTopicOperation<Q> extends BasicOperation {
protected static final String MY_SINK = "my-sink";
protected static final String MY_SOURCE = "my-source";
protected static final int TIMEOUT_SEC = 10;
@@ -74,8 +76,7 @@ public abstract class BasicBidirectionalTopicOperation extends BasicOperation {
@Mock
protected BidirectionalTopicConfig config;
- @SuppressWarnings("rawtypes")
- private TopicServer topicServer;
+ private TopicServer<Q> topicServer;
/**
* Constructs the object using a default actor and operation name.
@@ -161,8 +162,7 @@ public abstract class BasicBidirectionalTopicOperation extends BasicOperation {
* @param source topic from which the simulator should receive messages
* @return a new topic server/simulator
*/
- @SuppressWarnings("rawtypes")
- protected abstract TopicServer makeServer(TopicSink sink, TopicSource source);
+ protected abstract TopicServer<Q> makeServer(TopicSink sink, TopicSource source);
/**
* Initializes a configuration.
diff --git a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java
index 4331edb04..02225759c 100644
--- a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java
+++ b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java
@@ -42,10 +42,8 @@ import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig;
/**
* Superclass for various HttpOperation tests.
- *
- * @param <Q> request type
*/
-public class BasicHttpOperation<Q> extends BasicOperation {
+public class BasicHttpOperation extends BasicOperation {
protected static final String MY_CLIENT = "my-client";
protected static final String BASE_URI = "http://my-host:6969/base-uri/";
protected static final String PATH = "my-path/";