From 7c2f16fe88d07bd63e020a2ebff4651ed7b25d3b Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Mon, 2 Sep 2019 15:41:54 +0300 Subject: fix getDeactivateAndCloudDeletePath test Use hard coded in test instead of same logic of production code Issue-ID: VID-378 Signed-off-by: Eylon Malin Change-Id: I967432e5e35fde7661fc2145ac3815a4b0a05318 --- .../java/org/onap/vid/mso/MsoBusinessLogicImplTest.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'vid-app-common/src/test/java') diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java index 2ea37f4bc..63cd62cf5 100644 --- a/vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java @@ -845,20 +845,14 @@ public class MsoBusinessLogicImplTest extends AbstractTestNGSpringContextTests { @Test public void shouldProperlyGetDeactivateAndCloudDeletePathWithProperParameters() { - // given - String serviceInstanceId = "testServiceId"; - String vnfInstanceId = "testVnfInstanceId"; - String vfModuleInstanceId = "testVfModuleInstanceId"; - String path = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE); - path = path.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - path = path.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); - path += "/" + vfModuleInstanceId + "/deactivateAndCloudDelete"; // when - String response = msoBusinessLogic.getDeactivateAndCloudDeletePath(serviceInstanceId, vnfInstanceId, vfModuleInstanceId); + String response = msoBusinessLogic.getDeactivateAndCloudDeletePath("testServiceId", "testVnfInstanceId", "testVfModuleInstanceId"); // then - assertThat(response).isEqualTo(path); + String expectedPath = "/serviceInstantiation/v7/serviceInstances/testServiceId/vnfs/testVnfInstanceId/"+ + "vfModules/testVfModuleInstanceId/deactivateAndCloudDelete"; + assertThat(response).isEqualTo(expectedPath); } @Test -- cgit 1.2.3-korg