summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.sdnc/src/test
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-05 08:43:33 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-04-05 08:43:39 -0400
commit97ff0d774d4c41f5ca968d9ea5df07c978e77032 (patch)
tree0d28a64b727235f14790b2a6696377faf5bbb819 /models-interactions/model-actors/actor.sdnc/src/test
parentb0bb6076e2298c7a016a00adcaefb7ed75eac641 (diff)
Update SDNC changes
Per this review: https://gerrit.onap.org/r/#/c/83945/ Copying those changes into policy/models before removal in drools-applications. Issue-ID: POLICY-1264 Change-Id: I151816e78293af813d24ca1164ca364a3c54f87c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.sdnc/src/test')
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
index 7b64b87d2..7288ec126 100644
--- a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
@@ -2,8 +2,8 @@
* ============LICENSE_START=======================================================
* TestSdncActorServiceProvider
* ================================================================================
- * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corp. All rights reserved.
+ * Copyright (C) 2018-2019 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corp. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -69,31 +69,32 @@ public class SdncActorServiceProviderTest {
Policy policy = new Policy();
policy.setRecipe("Reroute");
- assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+ SdncActorServiceProvider provider = new SdncActorServiceProvider();
+ assertNull(provider.constructRequest(onset, operation, policy));
onset.getAai().put("network-information.network-id", "network-5555");
- assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+ assertNull(provider.constructRequest(onset, operation, policy));
PolicyEngine.manager.setEnvironmentProperty("aai.url", "http://localhost:6666");
PolicyEngine.manager.setEnvironmentProperty("aai.username", "AAI");
PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
- assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+ assertNull(provider.constructRequest(onset, operation, policy));
UUID requestId = UUID.randomUUID();
onset.setRequestId(requestId);
- assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+ assertNull(provider.constructRequest(onset, operation, policy));
PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
- assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+ assertNull(provider.constructRequest(onset, operation, policy));
onset.getAai().put("service-instance.service-instance-id", "service-instance-01");
- assertNotNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+ assertNotNull(provider.constructRequest(onset, operation, policy));
policy.setRecipe("Reroute");
- assertNotNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+ assertNotNull(provider.constructRequest(onset, operation, policy));
SdncRequest request =
- SdncActorServiceProvider.constructRequest(onset, operation, policy);
+ provider.constructRequest(onset, operation, policy);
assertEquals(requestId, Objects.requireNonNull(request).getRequestId());
assertEquals("reoptimize", request.getHealRequest().getRequestHeaderInfo().getSvcAction());