summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appc/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.appc/src/test')
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java12
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java12
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java6
3 files changed, 15 insertions, 15 deletions
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java
index 4bbb057d7..db104b6bb 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java
@@ -39,10 +39,10 @@ import org.onap.policy.appc.CommonHeader;
import org.onap.policy.appc.Request;
import org.onap.policy.appc.ResponseCode;
import org.onap.policy.appc.ResponseStatus;
+import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
import org.onap.policy.controlloop.actorserviceprovider.impl.BidirectionalTopicOperation.Status;
import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
-import org.onap.policy.controlloop.policy.PolicyResult;
public class AppcOperationTest extends BasicAppcOperation {
private AppcOperation oper;
@@ -220,21 +220,21 @@ public class AppcOperationTest extends BasicAppcOperation {
// null status
response.setStatus(null);
- assertSame(outcome, oper.setOutcome(outcome, PolicyResult.SUCCESS, response));
- assertEquals(PolicyResult.SUCCESS, outcome.getResult());
+ assertSame(outcome, oper.setOutcome(outcome, OperationResult.SUCCESS, response));
+ assertEquals(OperationResult.SUCCESS, outcome.getResult());
assertNotNull(outcome.getMessage());
assertSame(response, outcome.getResponse());
response.setStatus(status);
// null description
status.setDescription(null);
- assertSame(outcome, oper.setOutcome(outcome, PolicyResult.FAILURE, response));
- assertEquals(PolicyResult.FAILURE, outcome.getResult());
+ assertSame(outcome, oper.setOutcome(outcome, OperationResult.FAILURE, response));
+ assertEquals(OperationResult.FAILURE, outcome.getResult());
assertNotNull(outcome.getMessage());
assertSame(response, outcome.getResponse());
status.setDescription(MY_DESCRIPTION);
- for (PolicyResult result : PolicyResult.values()) {
+ for (OperationResult result : OperationResult.values()) {
assertSame(outcome, oper.setOutcome(outcome, result, response));
assertEquals(result, outcome.getResult());
assertEquals(MY_DESCRIPTION, outcome.getMessage());
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
index 1a8c60350..9d434cebf 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
@@ -42,11 +42,11 @@ import org.onap.policy.common.utils.coder.StandardCoderInstantAsMillis;
import org.onap.policy.common.utils.coder.StandardCoderObject;
import org.onap.policy.controlloop.actor.test.BasicBidirectionalTopicOperation;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
import org.onap.policy.controlloop.actorserviceprovider.Util;
import org.onap.policy.controlloop.actorserviceprovider.impl.OperationMaker;
import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig;
-import org.onap.policy.controlloop.policy.PolicyResult;
-import org.onap.policy.controlloop.policy.Target;
+import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
import org.onap.policy.simulators.AppcLegacyTopicServer;
import org.onap.policy.simulators.TopicServer;
import org.powermock.reflect.Whitebox;
@@ -103,6 +103,7 @@ public abstract class BasicAppcOperation extends BasicBidirectionalTopicOperatio
super.tearDownBasic();
}
+ @Override
protected TopicServer<Request> makeServer(TopicSink sink, TopicSource source) {
return new AppcLegacyTopicServer(sink, source);
}
@@ -126,7 +127,7 @@ public abstract class BasicAppcOperation extends BasicBidirectionalTopicOperatio
assertTrue(future2.isDone());
outcome = future2.get();
- assertEquals(PolicyResult.SUCCESS, outcome.getResult());
+ assertEquals(OperationResult.SUCCESS, outcome.getResult());
assertEquals(MY_DESCRIPTION, outcome.getMessage());
}
@@ -153,10 +154,9 @@ public abstract class BasicAppcOperation extends BasicBidirectionalTopicOperatio
protected void makeContext() {
super.makeContext();
- Target target = new Target();
- target.setResourceID(RESOURCE_ID);
+ Map<String, String> entities = Map.of(ControlLoopOperationParams.PARAMS_ENTITY_RESOURCEID, RESOURCE_ID);
- params = params.toBuilder().target(target).build();
+ params = params.toBuilder().targetEntityIds(entities).build();
}
/**
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java
index 2177dfa41..749b6c86c 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java
@@ -51,10 +51,10 @@ import org.onap.policy.appc.Response;
import org.onap.policy.common.utils.coder.CoderException;
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.controlloop.ControlLoopEventContext;
import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig;
import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicParams;
-import org.onap.policy.controlloop.policy.PolicyResult;
public class ModifyConfigOperationTest extends BasicAppcOperation {
@@ -120,7 +120,7 @@ public class ModifyConfigOperationTest extends BasicAppcOperation {
oper.setProperty(OperationProperties.AAI_RESOURCE_VNF, genvnf);
outcome = oper.start().get();
- assertEquals(PolicyResult.SUCCESS, outcome.getResult());
+ assertEquals(OperationResult.SUCCESS, outcome.getResult());
assertTrue(outcome.getResponse() instanceof Response);
}
@@ -162,7 +162,7 @@ public class ModifyConfigOperationTest extends BasicAppcOperation {
future2.complete(params.makeOutcome(null));
assertTrue(executor.runAll(100));
assertTrue(future3.isDone());
- assertEquals(PolicyResult.SUCCESS, future3.get().getResult());
+ assertEquals(OperationResult.SUCCESS, future3.get().getResult());
}
/**