Add PNF support to new CDS actor
[policy/models.git] / models-interactions / model-actors / actor.cds / src / test / java / org / onap / policy / controlloop / actor / cds / GrpcOperatorTest.java
index 2fd54e4..cfb20ab 100644 (file)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2020 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,6 +36,8 @@ import org.onap.policy.controlloop.actorserviceprovider.Util;
 import org.onap.policy.controlloop.actorserviceprovider.controlloop.ControlLoopEventContext;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException;
+import org.onap.policy.controlloop.policy.Target;
+import org.onap.policy.controlloop.policy.TargetType;
 
 public class GrpcOperatorTest {
 
@@ -85,8 +88,10 @@ public class GrpcOperatorTest {
     public void testBuildOperation() {
         VirtualControlLoopEvent event = new VirtualControlLoopEvent();
         ControlLoopEventContext context = new ControlLoopEventContext(event);
+        Target target = new Target();
+        target.setType(TargetType.VM);
         ControlLoopOperationParams params = ControlLoopOperationParams.builder().actor(CdsActorConstants.CDS_ACTOR)
-                        .operation(GrpcOperation.NAME).context(context).build();
+                        .operation(GrpcOperation.NAME).context(context).target(target).build();
 
         // not configured yet
         assertThatIllegalStateException().isThrownBy(() -> operation.buildOperation(params));