aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-09-02 15:41:54 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-03 13:04:35 +0000
commit7c2f16fe88d07bd63e020a2ebff4651ed7b25d3b (patch)
treec03f4aaa9cc5bbbe4a6ac62b430f6091534dd4e9 /vid-app-common/src/test
parentda094bf82ae74443afeb50d86712eb5e784b481d (diff)
fix getDeactivateAndCloudDeletePath test
Use hard coded in test instead of same logic of production code Issue-ID: VID-378 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Change-Id: I967432e5e35fde7661fc2145ac3815a4b0a05318
Diffstat (limited to 'vid-app-common/src/test')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java14
1 files changed, 4 insertions, 10 deletions
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