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.onap.appc.dg;
24 import java.util.HashMap;
27 import org.junit.Test;
28 import org.onap.appc.dg.mock.instance.MockConfigureNodeExecutor;
29 import org.onap.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
31 import com.att.eelf.configuration.EELFLogger;
32 import com.att.eelf.configuration.EELFManager;
33 /* need to move to open source
34 import com.att.sdnctl.dgtestlibrary.AbstractDGTestCase;
35 import com.att.sdnctl.dgtestlibrary.DGTestCase;
36 import com.att.sdnctl.dgtestlibrary.GraphKey;
38 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
41 public class TestGetAaiInfo /* extends AbstractDGTestCase */{
45 private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetAaiInfo.class);
46 public static String getAaiInfoXML = "src/main/resources/xml/APPC_GetAaiInfo.xml";
52 public void testGetSuccess() {
56 String propertyfileName = "APPC/GetAaiInfo/GetInfoSuccess.properties";
57 Map<String, Object> serviceReferences = new HashMap<String, Object>();
62 // Register Call graphs
63 String injectGraphXmls[] = new String[] { getAaiInfoXML};
66 GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null);
67 DGTestCase tc = new DGTestCase(graphKey);
68 tc.setInjectGraphXmls(injectGraphXmls);
69 tc.setServiceReferences(serviceReferences);
70 tc.setPropertyfileName(propertyfileName);
73 SvcLogicContext ctx = new SvcLogicContext();
74 processTestCase(tc, ctx);
76 } catch (Exception e) {
83 public void testGetVnfFail() {
87 String propertyfileName = "APPC/GetAaiInfo/GetVnfFail.properties";
88 Map<String, Object> serviceReferences = new HashMap<String, Object>();
93 // Register Call graphs
94 String injectGraphXmls[] = new String[] { getAaiInfoXML};
97 GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null);
98 DGTestCase tc = new DGTestCase(graphKey);
99 tc.setInjectGraphXmls(injectGraphXmls);
100 tc.setServiceReferences(serviceReferences);
101 tc.setPropertyfileName(propertyfileName);
104 SvcLogicContext ctx = new SvcLogicContext();
105 processTestCase(tc, ctx);
107 } catch (Exception e) {
113 public void testGetVServerFail() {
117 String propertyfileName = "APPC/GetAaiInfo/GetVServerFail.properties";
118 Map<String, Object> serviceReferences = new HashMap<String, Object>();
123 // Register Call graphs
124 String injectGraphXmls[] = new String[] { getAaiInfoXML};
127 GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null);
128 DGTestCase tc = new DGTestCase(graphKey);
129 tc.setInjectGraphXmls(injectGraphXmls);
130 tc.setServiceReferences(serviceReferences);
131 tc.setPropertyfileName(propertyfileName);
134 SvcLogicContext ctx = new SvcLogicContext();
135 processTestCase(tc, ctx);
137 } catch (Exception e) {