update MSO configuration URL
[vid.git] / vid-app-common / src / test / java / org / onap / vid / mso / MsoBusinessLogicImplTest.java
index 2ea37f4..558dc26 100644 (file)
@@ -138,7 +138,7 @@ public class MsoBusinessLogicImplTest extends AbstractTestNGSpringContextTests {
     public void shouldProperlyCreateConfigurationInstanceWithCorrectServiceInstanceId() throws Exception {
         // given
         String serviceInstanceId = "3f93c7cb-2fd0-4557-9514-e189b7b04f9d";
-        String endpointTemplate = String.format("/serviceInstances/v6/%s/configurations", serviceInstanceId);
+        String endpointTemplate = String.format("/serviceInstantiation/v7/serviceInstances/%s/configurations", serviceInstanceId);
         RequestDetailsWrapper requestDetailsWrapper = createRequestDetails();
         MsoResponseWrapper expectedResponse = createOkResponse();
         given(msoInterface.createConfigurationInstance(requestDetailsWrapper, endpointTemplate))
@@ -184,7 +184,7 @@ public class MsoBusinessLogicImplTest extends AbstractTestNGSpringContextTests {
     public void shouldProperlyCreateSvcInstanceWithProperParameters() {
 
         MsoResponseWrapper expectedResponse = createOkResponse();
-        String svcEndpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        String svcEndpoint = SystemProperties.getProperty(MsoProperties.MSO_RESTAPI_SERVICE_INSTANCE);
         given(msoInterface.createSvcInstance(msoRequest, svcEndpoint)).willReturn(expectedResponse);
 
         MsoResponseWrapper response = msoBusinessLogic.createSvcInstance(msoRequest);
@@ -833,7 +833,7 @@ public class MsoBusinessLogicImplTest extends AbstractTestNGSpringContextTests {
     public void shouldProperlyGetActivateFabricConfigurationPathWithProperParameters() {
         // given
         String serviceInstanceId = "testServiceId";
-        String path = validateEndpointPath(MsoProperties.MSO_REST_API_SERVICE_INSTANCE_CREATE);
+        String path = validateEndpointPath(MsoProperties.MSO_RESTAPI_SERVICE_INSTANCE);
         path += "/" + serviceInstanceId + "/activateFabricConfiguration";
 
         // when
@@ -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