aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-09-02 11:53:54 +0300
committerEylon Malin <eylon.malin@intl.att.com>2019-09-02 11:54:42 +0300
commita98f4ff3ed19a38ed18e34a5a18e3be2c9e63732 (patch)
treeb785a6be5993038232387338b122897a3741e5bc /vid-app-common/src
parent1b0d4c6a981f35a7fdf6a969aad483c871af4292 (diff)
Revert "add some UT for MsoBusinessLogicImpl"
This reverts commit b2805ebd910ecf9cc49597a52bd8f6e6b18f1d31 Reason for revert: duplicated tests. These scenarios already covered by another methods in this class. Issue-ID: VID-378 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Change-Id: I645b770d853dc39947222de5b8332d3e9fd23087
Diffstat (limited to 'vid-app-common/src')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java65
1 files changed, 0 insertions, 65 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 c9f576db1..c0683425b 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
@@ -42,7 +42,6 @@ import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.onap.vid.controller.MsoController.CONFIGURATION_ID;
import static org.onap.vid.controller.MsoController.REQUEST_TYPE;
@@ -72,7 +71,6 @@ import org.hamcrest.MatcherAssert;
import org.jetbrains.annotations.NotNull;
import org.mockito.ArgumentMatcher;
import org.mockito.Mock;
-import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.hamcrest.MockitoHamcrest;
import org.onap.portalsdk.core.util.SystemProperties;
@@ -1612,68 +1610,5 @@ public class MsoBusinessLogicImplTest extends AbstractTestNGSpringContextTests {
org.junit.Assert.assertThat(metadata.getRawData(), rawData);
org.junit.Assert.assertThat(metadata.getDescription(), descriptionMatcher);
}
-
- @Test(dataProvider = "unAssignOrDeleteParams")
- public void deleteSvcInstance_verifyEndPointPathConstructing(String status) {
- Mockito.reset(msoInterface);
- String endpoint = validateEndpointPath(MsoProperties.MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE);
- RequestDetails requestDetails = new RequestDetails();
-
-
- msoBusinessLogic.deleteSvcInstance(requestDetails, "tempId", status);
-
- verify(msoInterface).deleteSvcInstance(requestDetails, endpoint + "/tempId");
- }
-
- @DataProvider
- public Object[][] unAssignOrDeleteParams() {
- return new Object[][]{
- {"Active"},
- {"unexpected-status"},
- };
- }
-
- @Test(dataProvider = "unAssignStatus")
- public void deleteSvcInstance_verifyEndPointPathConstructing_unAssignFeatureOn(String status) {
- Mockito.reset(msoInterface);
- String endpoint = validateEndpointPath(MsoProperties.MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE);
- RequestDetails requestDetails = new RequestDetails();
-
- msoBusinessLogic.deleteSvcInstance(requestDetails, "tempId", status);
-
- verify(msoInterface).unassignSvcInstance(requestDetails, endpoint + "/tempId/unassign");
- }
-
- @DataProvider
- public Object[][] unAssignStatus() {
- return new Object[][]{
- {"Created"},
- {"Pendingdelete"},
- {"pending-Delete"},
- {"Assigned"}
- };
- }
-
- @Test
- public void deleteVnf_verifyEndPointPathConstructing() {
- String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE);
- RequestDetails requestDetails = new RequestDetails();
-
- String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, "serviceInstanceTempId");
-
- msoBusinessLogic.deleteVnf(requestDetails, "serviceInstanceTempId", "vnfInstanceTempId");
- verify(msoInterface).deleteVnf(requestDetails, vnf_endpoint + "/vnfInstanceTempId");
- }
-
- @Test
- public void deleteVfModule_verifyEndPointPathConstructing() {
- String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
- RequestDetails requestDetails = new RequestDetails();
-
- String vf__modules_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, "serviceInstanceTempId").replaceFirst(VNF_INSTANCE_ID, "vnfInstanceTempId");
-
- msoBusinessLogic.deleteVfModule(requestDetails, "serviceInstanceTempId", "vnfInstanceTempId", "vfModuleTempId");
- verify(msoInterface).deleteVfModule(requestDetails, vf__modules_endpoint + "/vfModuleTempId");
- }
}