Removing old name references
[appc.git] / appc-directed-graph / appc-dgraph / provider / src / test / java / org / onap / appc / dg / TestGetDeviceRunningConfig.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 static org.junit.Assert.assertNotNull;
29
30 import org.junit.Test;
31
32 import com.att.eelf.configuration.EELFLogger;
33 import com.att.eelf.configuration.EELFManager;
34 /* need to move to open source
35 import org.onap.sdnc.dgtestlibrary.AbstractDGTestCase;
36 import org.onap.sdnc.dgtestlibrary.DGTestCase;
37 import org.onap.sdnc.dgtestlibrary.GraphKey;
38 */
39 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
40
41 public class TestGetDeviceRunningConfig /* extends AbstractDGTestCase */ {
42     private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetConfigParams.class);
43 /*
44     public String jsonPath = "src/main/resources/json";
45     public String xmlpath = "src/main/resources/xml";
46
47     @Test
48     public void testChefRunningConfigSuccess() {
49         try {
50             logger.info("********************************* testChefRunningConfigSuccess *************************************");
51             //DGMockUtils.generateXMLFile(jsonPath, xmlpath);
52
53             String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Success.properties";
54
55             String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml";
56             // Register Call graphs
57             String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML };
58
59
60             GraphKey  graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null);
61             DGTestCase tc = new DGTestCase(graphKey);
62             tc.setInjectGraphXmls(injectGraphXmls);
63             tc.setPropertyfileName(propertyfileName);
64
65             SvcLogicContext ctx = new SvcLogicContext();
66             processTestCase(tc, ctx);
67
68             assertContextWithProperty(ctx);
69
70
71         } catch (Exception e) {
72             e.printStackTrace();
73         }
74     }
75
76     @Test
77     public void testChefRunningConfigFailure() {
78         try {
79
80             logger.info("********************************* testChefRunningConfigFailure *************************************");
81             String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Failure.properties";
82
83             String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml";
84             // Register Call graphs
85             String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML };
86
87
88             GraphKey  graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null);
89             DGTestCase tc = new DGTestCase(graphKey);
90             tc.setInjectGraphXmls(injectGraphXmls);
91             tc.setPropertyfileName(propertyfileName);
92
93
94             SvcLogicContext ctx = new SvcLogicContext();
95             processTestCase(tc, ctx);
96
97             assertContextWithProperty(ctx);
98
99             //DGMockUtils.printContext(ctx);
100
101         } catch (Exception e) {
102             e.printStackTrace();
103         }
104     }
105
106     @Test
107     public void testChefRunningConfigOthers() {
108         try {
109             logger.info("********************************* testChefRunningConfigOthers *************************************");
110             String propertyfileName = "APPC/GetDeviceRunningConfig/Chef_Others.properties";
111
112             String getDeviceRunningConfigXML = "src/main/resources/xml/APPC_GetDeviceRunningConfig.xml";
113             // Register Call graphs
114             String injectGraphXmls[] = new String[] { getDeviceRunningConfigXML };
115
116
117             GraphKey  graphKey = new GraphKey("APPC", null, "GetDeviceRunningConfig", null);
118             DGTestCase tc = new DGTestCase(graphKey);
119             tc.setInjectGraphXmls(injectGraphXmls);
120             tc.setPropertyfileName(propertyfileName);
121
122
123             SvcLogicContext ctx = new SvcLogicContext();
124             processTestCase(tc, ctx);
125
126             assertContextWithProperty(ctx);
127
128             //DGMockUtils.printContext(ctx);
129
130         } catch (Exception e) {
131             e.printStackTrace();
132         }
133     }
134 */
135 }