f7307acb24dd56c63fb3a2a5c803fb04a6922c5d
[appc.git] / appc-directed-graph / appc-dgraph / provider / src / test / java / org / onap / appc / dg / TestGetAaiInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
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
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
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.
20  * 
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  * ============LICENSE_END=========================================================
23  */
24
25 package org.onap.appc.dg;
26
27
28 import java.util.HashMap;
29 import java.util.Map;
30
31 import org.junit.Test;
32 import org.onap.appc.dg.mock.instance.MockConfigureNodeExecutor;
33 import org.onap.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
34
35 import com.att.eelf.configuration.EELFLogger;
36 import com.att.eelf.configuration.EELFManager;
37 /* need to move to open source
38 import com.att.sdnctl.dgtestlibrary.AbstractDGTestCase;
39 import com.att.sdnctl.dgtestlibrary.DGTestCase;
40 import com.att.sdnctl.dgtestlibrary.GraphKey;
41 */
42 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
43
44
45 public class TestGetAaiInfo /* extends AbstractDGTestCase */{
46
47 /*
48
49     private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetAaiInfo.class);
50     public static String getAaiInfoXML = "src/main/resources/xml/APPC_GetAaiInfo.xml";
51
52
53
54
55     @Test
56     public void testGetSuccess() {
57         try {
58
59
60             String propertyfileName = "APPC/GetAaiInfo/GetInfoSuccess.properties";
61             Map<String, Object> serviceReferences = new HashMap<String, Object>();
62
63
64
65
66             // Register Call graphs
67             String injectGraphXmls[] = new String[] { getAaiInfoXML};
68
69
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);
75
76
77             SvcLogicContext ctx = new SvcLogicContext();
78             processTestCase(tc, ctx);
79
80         } catch (Exception e) {
81             e.printStackTrace();
82         }
83     }
84
85
86     @Test
87     public void testGetVnfFail() {
88         try {
89
90
91             String propertyfileName = "APPC/GetAaiInfo/GetVnfFail.properties";
92             Map<String, Object> serviceReferences = new HashMap<String, Object>();
93
94
95
96
97             // Register Call graphs
98             String injectGraphXmls[] = new String[] { getAaiInfoXML};
99
100
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);
106
107
108             SvcLogicContext ctx = new SvcLogicContext();
109             processTestCase(tc, ctx);
110
111         } catch (Exception e) {
112             e.printStackTrace();
113         }
114     }
115
116     @Test
117     public void testGetVServerFail() {
118         try {
119
120
121             String propertyfileName = "APPC/GetAaiInfo/GetVServerFail.properties";
122             Map<String, Object> serviceReferences = new HashMap<String, Object>();
123
124
125
126
127             // Register Call graphs
128             String injectGraphXmls[] = new String[] { getAaiInfoXML};
129
130
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);
136
137
138             SvcLogicContext ctx = new SvcLogicContext();
139             processTestCase(tc, ctx);
140
141         } catch (Exception e) {
142             e.printStackTrace();
143         }
144     }
145 */
146 }
147
148
149
150