diff options
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src')
2 files changed, 13 insertions, 0 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java index d8db70619..e2d94b3b3 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java +++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java @@ -25,6 +25,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.NonNull; import org.onap.policy.controlloop.ControlLoopOperation; +import org.onap.policy.controlloop.ControlLoopResponse; import org.onap.policy.controlloop.policy.PolicyResult; /** @@ -42,6 +43,7 @@ public class OperationOutcome { private PolicyResult result = PolicyResult.SUCCESS; private String message; private boolean finalOutcome; + private ControlLoopResponse controlLoopResponse; /** * Copy constructor. @@ -58,6 +60,7 @@ public class OperationOutcome { this.result = source.result; this.message = source.message; this.finalOutcome = source.finalOutcome; + this.controlLoopResponse = source.controlLoopResponse; } /** 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); } } |