2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.mso.client.appc;
\r
23 import static org.junit.Assert.assertEquals;
\r
25 import java.util.Optional;
\r
26 import java.util.UUID;
\r
28 import org.junit.BeforeClass;
\r
29 import org.junit.Ignore;
\r
30 import org.junit.Test;
\r
32 import org.onap.appc.client.lcm.model.Action;
\r
33 import org.onap.appc.client.lcm.model.Status;
\r
35 public class ApplicationControllerOrchestratorTest {
\r
38 public static void beforeClass() {
\r
39 System.setProperty("mso.config.path", "src/test/resources");
\r
44 public void vnfCommandTest() {
\r
45 ApplicationControllerOrchestrator client = new ApplicationControllerOrchestrator();
\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
55 assertEquals("Status of vnfCommand is correct", status.getCode(), 306);
\r
60 public void vnfCommandTest1() {
\r
61 ApplicationControllerOrchestrator client = new ApplicationControllerOrchestrator();
\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
71 assertEquals("Status of vnfCommand is correct", status.getCode(), 306);
\r