2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Copyright (C) 2017 Amdocs
8 * =============================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 * ============LICENSE_END=========================================================
25 package org.onap.appc.dg;
28 import java.util.HashMap;
31 import org.junit.Test;
32 import org.onap.appc.dg.mock.instance.MockConfigureNodeExecutor;
33 import org.onap.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
35 import com.att.eelf.configuration.EELFLogger;
36 import com.att.eelf.configuration.EELFManager;
37 /* need to move to open source
38 import org.onap.sdnc.dgtestlibrary.AbstractDGTestCase;
39 import org.onap.sdnc.dgtestlibrary.DGTestCase;
40 import org.onap.sdnc.dgtestlibrary.GraphKey;
42 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
45 public class TestGetAaiInfo /* extends AbstractDGTestCase */{
49 private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetAaiInfo.class);
50 public static String getAaiInfoXML = "src/main/resources/xml/APPC_GetAaiInfo.xml";
56 public void testGetSuccess() {
60 String propertyfileName = "APPC/GetAaiInfo/GetInfoSuccess.properties";
61 Map<String, Object> serviceReferences = new HashMap<String, Object>();
66 // Register Call graphs
67 String injectGraphXmls[] = new String[] { getAaiInfoXML};
70 GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null);
71 DGTestCase tc = new DGTestCase(graphKey);
72 tc.setInjectGraphXmls(injectGraphXmls);
73 tc.setServiceReferences(serviceReferences);
74 tc.setPropertyfileName(propertyfileName);
77 SvcLogicContext ctx = new SvcLogicContext();
78 processTestCase(tc, ctx);
80 } catch (Exception e) {
87 public void testGetVnfFail() {
91 String propertyfileName = "APPC/GetAaiInfo/GetVnfFail.properties";
92 Map<String, Object> serviceReferences = new HashMap<String, Object>();
97 // Register Call graphs
98 String injectGraphXmls[] = new String[] { getAaiInfoXML};
101 GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null);
102 DGTestCase tc = new DGTestCase(graphKey);
103 tc.setInjectGraphXmls(injectGraphXmls);
104 tc.setServiceReferences(serviceReferences);
105 tc.setPropertyfileName(propertyfileName);
108 SvcLogicContext ctx = new SvcLogicContext();
109 processTestCase(tc, ctx);
111 } catch (Exception e) {
117 public void testGetVServerFail() {
121 String propertyfileName = "APPC/GetAaiInfo/GetVServerFail.properties";
122 Map<String, Object> serviceReferences = new HashMap<String, Object>();
127 // Register Call graphs
128 String injectGraphXmls[] = new String[] { getAaiInfoXML};
131 GraphKey graphKey = new GraphKey("APPC", null, "GetAaiInfo", null);
132 DGTestCase tc = new DGTestCase(graphKey);
133 tc.setInjectGraphXmls(injectGraphXmls);
134 tc.setServiceReferences(serviceReferences);
135 tc.setPropertyfileName(propertyfileName);
138 SvcLogicContext ctx = new SvcLogicContext();
139 processTestCase(tc, ctx);
141 } catch (Exception e) {