summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-11-18 12:04:26 -0500
committerJim Hahn <jrh3@att.com>2020-11-18 13:56:22 -0500
commit3d776b9d24b73b366b2f1e70b6c536e4d2705202 (patch)
tree74df66d9de508147afd40d18d7d9d0891ec3cfec /controlloop/common/eventmanager/src/test
parente8369d6d3088b7b68acb987ebff432ac830a3200 (diff)
Delete preprocessed flag from actors
Removed the "preprocessed" flag from the Actor parameters, now that the actors no longer have a startPreprocess() method. Also removed targetEntity from the parameters. Issue-ID: POLICY-2804 Change-Id: I13bc80e1b6bb22d8d21b176796ca062109ce6658 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/test')
-rw-r--r--controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/StepTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/StepTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/StepTest.java
index aec4693f8..cd22881b8 100644
--- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/StepTest.java
+++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/StepTest.java
@@ -52,6 +52,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.actorserviceprovider.ActorService;
import org.onap.policy.controlloop.actorserviceprovider.Operation;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
import org.onap.policy.controlloop.actorserviceprovider.Operator;
import org.onap.policy.controlloop.actorserviceprovider.TargetType;
@@ -103,6 +104,7 @@ public class StepTest {
when(policyActor.getOperator(POLICY_OPERATION)).thenReturn(policyOperator);
when(policyOperator.buildOperation(any())).thenReturn(policyOperation);
when(policyOperation.start()).thenReturn(future);
+ when(policyOperation.getProperty(OperationProperties.AAI_TARGET_ENTITY)).thenReturn(MY_TARGET);
entityIds = Map.of("entity-name-A", "entity-value-A");
@@ -123,7 +125,7 @@ public class StepTest {
.completeCallback(completions::add).executor(ForkJoinPool.commonPool())
.operation(POLICY_OPERATION).payload(new TreeMap<>(payload)).startCallback(starts::add)
.targetType(TargetType.valueOf(target.getTargetType())).targetEntityIds(target.getEntityIds())
- .requestId(REQ_ID).targetEntity(MY_TARGET).build();
+ .requestId(REQ_ID).build();
startTime = new AtomicReference<>();
@@ -160,7 +162,6 @@ public class StepTest {
assertNull(params2.getTimeoutSec());
assertEquals(target.getTargetType().toString(), params2.getTargetType().toString());
assertSame(entityIds, params2.getTargetEntityIds());
- assertEquals(MY_TARGET, params2.getTargetEntity());
assertTrue(params2.getPayload().isEmpty());
when(actors.getActor(params2.getActor())).thenReturn(policyActor);
@@ -364,6 +365,12 @@ public class StepTest {
}
@Test
+ public void testMakeOutcome() {
+ step.init();
+ assertEquals(MY_TARGET, step.makeOutcome().getTarget());
+ }
+
+ @Test
public void testToString() {
assertNotNull(step.toString());
}