From 97ff0d774d4c41f5ca968d9ea5df07c978e77032 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 5 Apr 2019 08:43:33 -0400 Subject: 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 --- .../actor/sdnc/SdncActorServiceProviderTest.java | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'models-interactions/model-actors/actor.sdnc/src/test') 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()); -- cgit 1.2.3-korg