0597367407227a4ec081813bc9ec6db19e3a1a58
[appc.git] / appc-directed-graph / appc-dgraph / provider / src / test / java / org / openecomp / appc / dg / TestGetAaiInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APP-C
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.appc.dg;
22
23
24 import java.util.HashMap;
25 import java.util.Map;
26
27 import org.junit.Test;
28 import org.openecomp.appc.dg.mock.instance.MockConfigureNodeExecutor;
29 import org.openecomp.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
30
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;
37 */
38 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
39
40
41 public class TestGetAaiInfo /* extends AbstractDGTestCase */{
42
43 /*
44         
45         private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetAaiInfo.class);
46         public static String getAaiInfoXML = "src/main/resources/xml/APPC_GetAaiInfo.xml";
47
48
49
50         
51         @Test
52         public void testGetSuccess() {
53                 try {
54
55
56                         String propertyfileName = "APPC/GetAaiInfo/GetInfoSuccess.properties";
57                         Map<String, Object> serviceReferences = new HashMap<String, Object>();
58
59                         
60                         
61                         
62                         // Register Call graphs
63                         String injectGraphXmls[] = new String[] { getAaiInfoXML};
64
65
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);
71                         
72
73                         SvcLogicContext ctx = new SvcLogicContext();
74                         processTestCase(tc, ctx);
75                         
76                 } catch (Exception e) {
77                         e.printStackTrace();
78                 }
79         }
80         
81         
82         @Test
83         public void testGetVnfFail() {
84                 try {
85
86
87                         String propertyfileName = "APPC/GetAaiInfo/GetVnfFail.properties";
88                         Map<String, Object> serviceReferences = new HashMap<String, Object>();
89
90                         
91                         
92                         
93                         // Register Call graphs
94                         String injectGraphXmls[] = new String[] { getAaiInfoXML};
95
96
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);
102                         
103
104                         SvcLogicContext ctx = new SvcLogicContext();
105                         processTestCase(tc, ctx);
106                         
107                 } catch (Exception e) {
108                         e.printStackTrace();
109                 }
110         }
111         
112         @Test
113         public void testGetVServerFail() {
114                 try {
115
116
117                         String propertyfileName = "APPC/GetAaiInfo/GetVServerFail.properties";
118                         Map<String, Object> serviceReferences = new HashMap<String, Object>();
119
120                         
121                         
122                         
123                         // Register Call graphs
124                         String injectGraphXmls[] = new String[] { getAaiInfoXML};
125
126
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);
132                         
133
134                         SvcLogicContext ctx = new SvcLogicContext();
135                         processTestCase(tc, ctx);
136                         
137                 } catch (Exception e) {
138                         e.printStackTrace();
139                 }
140         }
141 */      
142 }
143
144
145
146