summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.test/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.test/src/test')
-rw-r--r--models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java24
-rw-r--r--models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java20
-rw-r--r--models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java2
3 files changed, 17 insertions, 29 deletions
diff --git a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java
index 9ec118e69..101f130a3 100644
--- a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java
+++ b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java
@@ -24,7 +24,6 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
@@ -54,14 +53,14 @@ public class BasicBidirectionalTopicOperationTest {
MockitoAnnotations.initMocks(this);
oper = new BasicBidirectionalTopicOperation(ACTOR, OPERATION);
- oper.setUp();
+ oper.setUpBasic();
}
@Test
public void testBasicBidirectionalTopicOperation() {
oper = new BasicBidirectionalTopicOperation();
- assertEquals(BasicHttpOperation.DEFAULT_ACTOR, oper.actorName);
- assertEquals(BasicHttpOperation.DEFAULT_OPERATION, oper.operationName);
+ assertEquals(BasicOperation.DEFAULT_ACTOR, oper.actorName);
+ assertEquals(BasicOperation.DEFAULT_OPERATION, oper.operationName);
}
@Test
@@ -72,24 +71,19 @@ public class BasicBidirectionalTopicOperationTest {
@Test
public void testSetUp() {
- assertNotNull(oper.topicParams);
+ assertNotNull(oper.config);
assertNotNull(oper.context);
assertNotNull(oper.outcome);
assertNotNull(oper.executor);
- assertTrue(oper.operator.isAlive());
}
@Test
public void testInitOperator() {
- oper.initOperator();
-
- assertTrue(oper.operator.isAlive());
- assertEquals(ACTOR + "." + OPERATION, oper.operator.getFullName());
- assertEquals(ACTOR, oper.operator.getActorName());
- assertEquals(OPERATION, oper.operator.getName());
- assertSame(oper.topicHandler, oper.operator.getTopicHandler());
- assertSame(oper.forwarder, oper.operator.getForwarder());
- assertSame(oper.topicParams, oper.operator.getParams());
+ oper.initConfig();
+
+ assertSame(oper.topicHandler, oper.config.getTopicHandler());
+ assertSame(oper.forwarder, oper.config.getForwarder());
+ assertEquals(BasicBidirectionalTopicOperation.TIMEOUT_MS, oper.config.getTimeoutMs());
}
@Test
diff --git a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java
index c463d6d49..c19aa487c 100644
--- a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java
+++ b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java
@@ -23,7 +23,6 @@ package org.onap.policy.controlloop.actor.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
@@ -42,14 +41,14 @@ public class BasicHttpOperationTest {
@Before
public void setUp() throws Exception {
oper = new BasicHttpOperation<>(ACTOR, OPERATION);
- oper.setUp();
+ oper.setUpBasic();
}
@Test
public void testBasicHttpOperation() {
oper = new BasicHttpOperation<>();
- assertEquals(BasicHttpOperation.DEFAULT_ACTOR, oper.actorName);
- assertEquals(BasicHttpOperation.DEFAULT_OPERATION, oper.operationName);
+ assertEquals(BasicOperation.DEFAULT_ACTOR, oper.actorName);
+ assertEquals(BasicOperation.DEFAULT_OPERATION, oper.operationName);
}
@Test
@@ -68,19 +67,14 @@ public class BasicHttpOperationTest {
assertNotNull(oper.context);
assertNotNull(oper.outcome);
assertNotNull(oper.executor);
- assertTrue(oper.operator.isAlive());
}
@Test
public void testInitOperator() throws Exception {
- oper.initOperator();
-
- assertTrue(oper.operator.isAlive());
- assertEquals(ACTOR + "." + OPERATION, oper.operator.getFullName());
- assertEquals(ACTOR, oper.operator.getActorName());
- assertEquals(OPERATION, oper.operator.getName());
- assertSame(oper.client, oper.operator.getClient());
- assertEquals(BasicHttpOperation.PATH, oper.operator.getPath());
+ oper.initConfig();
+
+ assertSame(oper.client, oper.config.getClient());
+ assertEquals(BasicHttpOperation.PATH, oper.config.getPath());
}
@Test
diff --git a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java
index ee0e5cee4..60bb00892 100644
--- a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java
+++ b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java
@@ -43,7 +43,7 @@ public class BasicOperationTest {
@Before
public void setUp() throws Exception {
oper = new BasicHttpOperation<>(ACTOR, OPERATION);
- oper.setUp();
+ oper.setUpBasic();
}
@Test