package correction for vnfadater
[so.git] / adapters / mso-vnf-adapter / src / test / java / org / openecomp / mso / adapters / vnf / MsoVnfCloudifyAdapterImplTest.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * ONAP - SO\r
4  * ================================================================================\r
5  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  */\r
20 \r
21 package org.openecomp.mso.adapters.vnf;\r
22 \r
23 import java.util.HashMap;\r
24 import java.util.Map;\r
25 import javax.xml.ws.Holder;\r
26 import org.junit.Test;\r
27 import org.openecomp.mso.adapters.vnf.MsoVnfCloudifyAdapterImpl;\r
28 import org.openecomp.mso.entity.MsoRequest;\r
29 import org.openecomp.mso.openstack.beans.VnfRollback;\r
30 \r
31 public class MsoVnfCloudifyAdapterImplTest {\r
32 \r
33         @Test\r
34         public void healthCheckVNFTest() {\r
35                 MsoVnfCloudifyAdapterImpl instance = new MsoVnfCloudifyAdapterImpl();\r
36                 instance.healthCheck();\r
37         }\r
38 \r
39         @Test\r
40         public void createVnfTest() {\r
41                 MsoVnfCloudifyAdapterImpl instance = new MsoVnfCloudifyAdapterImpl();\r
42                 MsoRequest msoRequest = new MsoRequest();\r
43                 msoRequest.setRequestId("12345");\r
44                 msoRequest.setServiceInstanceId("12345");\r
45 \r
46                 Map<String, String> map = new HashMap<>();\r
47                 map.put("key1", "value1");\r
48                 try {\r
49                         instance.createVnf("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",\r
50                                         "volumeGroupHeatStackId|1", map,\r
51                                         Boolean.FALSE, Boolean.TRUE, msoRequest, new Holder<>(), new Holder<>(),\r
52                 new Holder<>());\r
53                 } catch (Exception e) {\r
54                 }\r
55         }\r
56 \r
57         @Test\r
58         public void updateVnfTest() {\r
59                 MsoVnfCloudifyAdapterImpl instance = new MsoVnfCloudifyAdapterImpl();\r
60                 MsoRequest msoRequest = new MsoRequest();\r
61                 msoRequest.setRequestId("12345");\r
62                 msoRequest.setServiceInstanceId("12345");\r
63 \r
64                 Map<String, String> map = new HashMap<>();\r
65                 \r
66                 map.put("key1", "value1");\r
67                 try {\r
68                         instance.updateVnf("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",\r
69                                         "volumeGroupHeatStackId|1",  map, msoRequest, new Holder<>(),\r
70                 new Holder<>());\r
71                 } catch (Exception e) {\r
72 \r
73                 }\r
74         }\r
75 \r
76         @Test\r
77         public void deleteVnfTest() {\r
78                 MsoVnfCloudifyAdapterImpl instance = new MsoVnfCloudifyAdapterImpl();\r
79                 MsoRequest msoRequest = new MsoRequest();\r
80                 msoRequest.setRequestId("12345");\r
81                 msoRequest.setServiceInstanceId("12345");\r
82                 try {\r
83                         instance.deleteVnf("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12", msoRequest);\r
84                 } catch (Exception e) {\r
85 \r
86                 }\r
87         }\r
88 \r
89 }\r