aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actorServiceProvider
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2020-02-28 17:53:54 -0500
committerRam Krishna Verma <ram_krishna.verma@bell.ca>2020-03-02 11:05:40 -0500
commit45d22a7522d184c0015ffabf7fc8726a96ef8724 (patch)
treea23e41cae5e1a29901c9fdd266050fb6a544d655 /models-interactions/model-actors/actorServiceProvider
parentd0ba41b23a788bc557f451a0c66f0095c10dd390 (diff)
Testcases for cds actor
Adding test cases for cds actor, operator, operation & manager. Coverage is more than 95% overall. Fixed review comments. Issue-ID: POLICY-2384 Change-Id: I64beeb0c46918b990ad7e67248559169fc7940a1 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider')
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperatorTest.java7
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperatorTest.java7
2 files changed, 8 insertions, 6 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperatorTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperatorTest.java
index ae923c0bd..b5e3de32c 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperatorTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperatorTest.java
@@ -125,13 +125,14 @@ public class BidirectionalTopicOperatorTest {
ControlLoopOperationParams params2 = ControlLoopOperationParams.builder().build();
- // not running yet
- assertThatIllegalStateException().isThrownBy(() -> oper2.buildOperation(params2));
-
// configure and start it
params = BidirectionalTopicParams.builder().sourceTopic(MY_SOURCE).sinkTopic(MY_SINK).timeoutSec(TIMEOUT_SEC)
.build();
oper2.configure(Util.translateToMap(OPERATION, params));
+
+ // not running yet
+ assertThatIllegalStateException().isThrownBy(() -> oper2.buildOperation(params2));
+
oper2.start();
assertSame(operation, oper2.buildOperation(params2));
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperatorTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperatorTest.java
index 873a306c2..f85ef30b6 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperatorTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperatorTest.java
@@ -116,13 +116,14 @@ public class HttpOperatorTest {
ControlLoopOperationParams params =
ControlLoopOperationParams.builder().actor(ACTOR).operation(OPERATION).context(context).build();
- // not running yet
- assertThatIllegalStateException().isThrownBy(() -> oper2.buildOperation(params));
-
// configure and start it
HttpParams params2 = HttpParams.builder().clientName(HTTP_CLIENT).path(PATH).timeoutSec(TIMEOUT).build();
Map<String, Object> paramMap = Util.translateToMap(OPERATION, params2);
oper2.configure(paramMap);
+
+ // not running yet
+ assertThatIllegalStateException().isThrownBy(() -> oper2.buildOperation(params));
+
oper2.start();
Operation operation1 = oper2.buildOperation(params);