summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actorServiceProvider/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-04-08 12:37:20 -0400
committerJim Hahn <jrh3@att.com>2020-04-08 14:36:45 -0400
commitdf6d6bb862fb0af49a8873479f9e3b609553deca (patch)
treebc5ef9a08ccb0c0a4a27951c56c5b42350d297ea /models-interactions/model-actors/actorServiceProvider/src/test
parent9b3ff5f270572a6760ff07dda9577cdadb53b088 (diff)
SDNR Actor enhancements
Made the following changes: - Enhanced SDNR Actor to support any operation name specified within the policy, constructing the same request, but passing a different "RPC name" and "Action" in the request. - Added ControlLoopResponse to OperationOutcome - Modified SDNR Actor to populate ControlLoopResponse Issue-ID: POLICY-2468 Change-Id: I50ee0674077d975f3cd211454656edc47d78520f Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src/test')
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java
index 4e9728336..77d2253e1 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java
@@ -23,12 +23,14 @@ package org.onap.policy.controlloop.actorserviceprovider;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import java.time.Instant;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.ControlLoopResponse;
import org.onap.policy.controlloop.policy.PolicyResult;
public class OperationOutcomeTest {
@@ -41,10 +43,16 @@ public class OperationOutcomeTest {
private static final PolicyResult RESULT = PolicyResult.FAILURE_GUARD;
private static final String MESSAGE = "my-message";
+ private ControlLoopResponse response;
private OperationOutcome outcome;
+ /**
+ * Sets up.
+ */
@Before
public void setUp() {
+ response = new ControlLoopResponse();
+
outcome = new OperationOutcome();
}
@@ -62,6 +70,7 @@ public class OperationOutcomeTest {
assertEquals(SUB_REQ_ID, outcome2.getSubRequestId());
assertEquals(RESULT, outcome2.getResult());
assertEquals(MESSAGE, outcome2.getMessage());
+ assertSame(response, outcome2.getControlLoopResponse());
}
@Test
@@ -133,5 +142,6 @@ public class OperationOutcomeTest {
outcome.setStart(START);
outcome.setSubRequestId(SUB_REQ_ID);
outcome.setTarget(TARGET);
+ outcome.setControlLoopResponse(response);
}
}