AT&T 1712 and 1802 release code
[so.git] / bpmn / MSOCommonBPMN / src / test / java / org / openecomp / mso / client / appc / ApplicationControllerOrchestratorTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.mso.client.appc;\r
22 \r
23 import static org.junit.Assert.assertEquals;\r
24 \r
25 import java.util.Optional;\r
26 import java.util.UUID;\r
27 \r
28 import org.junit.BeforeClass;\r
29 import org.junit.Ignore;\r
30 import org.junit.Test;\r
31 \r
32 import org.onap.appc.client.lcm.model.Action;\r
33 import org.onap.appc.client.lcm.model.Status;\r
34 \r
35 public class ApplicationControllerOrchestratorTest {\r
36 \r
37         @BeforeClass\r
38         public static void beforeClass() {\r
39                 System.setProperty("mso.config.path", "src/test/resources");\r
40         }\r
41 \r
42         @Test\r
43         @Ignore\r
44         public void vnfCommandTest() {\r
45                 ApplicationControllerOrchestrator client = new ApplicationControllerOrchestrator();\r
46                 Status status;\r
47                 try {\r
48                         status = client.vnfCommand(Action.Lock, UUID.randomUUID().toString(),\r
49                                         "3ffdee3c-94d2-45fe-904d-fc1efa0f8b59", Optional.of(""));\r
50                 } catch (ApplicationControllerOrchestratorException e) {\r
51                         status = new Status();\r
52                         status.setCode(e.getAppcCode());\r
53                         status.setMessage(e.getMessage());\r
54                 }\r
55                 assertEquals("Status of vnfCommand is correct", status.getCode(), 306);\r
56         }\r
57 \r
58         @Test\r
59         @Ignore\r
60         public void vnfCommandTest1() {\r
61                 ApplicationControllerOrchestrator client = new ApplicationControllerOrchestrator();\r
62                 Status status;\r
63                 try {\r
64                         status = client.vnfCommand(Action.Unlock, UUID.randomUUID().toString(),\r
65                                         "ca522254-2ba4-4fbd-b15b-0ef0d9cfda5f", Optional.of(""));\r
66                 } catch (ApplicationControllerOrchestratorException e) {\r
67                         status = new Status();\r
68                         status.setCode(e.getAppcCode());\r
69                         status.setMessage(e.getMessage());\r
70                 }\r
71                 assertEquals("Status of vnfCommand is correct", status.getCode(), 306);\r
72         }\r
73 }