231dd6b0ab6c22c62ab7d76a1af0df25d2687001
[appc.git] / appc-directed-graph / appc-dgraph / provider / src / test / java / org / onap / appc / dg / TestDownloadIsbcConfig.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.MockSvcLogicJavaPlugin;
33
34 /* need to move to open source
35 import com.att.sdnctl.dgtestlibrary.AbstractDGTestCase;
36 import com.att.sdnctl.dgtestlibrary.DGTestCase;
37 import com.att.sdnctl.dgtestlibrary.GraphKey;
38 */
39 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
40 import com.att.eelf.configuration.EELFLogger;
41 import com.att.eelf.configuration.EELFManager;
42
43 public class TestDownloadIsbcConfig /* extends AbstractDGTestCase */{
44     private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestDownloadIsbcConfig.class);
45     public static String DownloadIsbcConfigXML = "src/main/resources/xml/APPC_DownloadIsbcConfig.xml";
46
47 /*
48     @Test
49     public void testDownloadIsbcConfigSuccess() {
50         try {
51
52             String propertyfileName = "APPC/DownloadIsbcConfig/DownloadIsbcConfig_Success.properties";
53
54             // Register Call graphs
55             String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
56
57             Map<String, Object> serviceReferences = new HashMap<String, Object>();
58
59
60
61
62             GraphKey  graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
63             DGTestCase tc = new DGTestCase(graphKey);
64
65
66             tc.setInjectGraphXmls(injectGraphXmls);
67             tc.setServiceReferences(serviceReferences);
68             tc.setPropertyfileName(propertyfileName);
69
70
71
72             SvcLogicContext ctx = new SvcLogicContext();
73             processTestCase(tc, ctx);
74
75
76
77
78         } catch (Exception e) {
79             e.printStackTrace();
80         }
81     }
82
83
84     @Test
85     public void testConfigFileFailure() {
86         try {
87
88             String propertyfileName = "APPC/DownloadIsbcConfig/ConfigFile_Failure.properties";
89
90             // Register Call graphs
91             String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
92
93             Map<String, Object> serviceReferences = new HashMap<String, Object>();
94
95
96
97             GraphKey  graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
98             DGTestCase tc = new DGTestCase(graphKey);
99
100
101             tc.setInjectGraphXmls(injectGraphXmls);
102             tc.setServiceReferences(serviceReferences);
103             tc.setPropertyfileName(propertyfileName);
104
105
106
107             SvcLogicContext ctx = new SvcLogicContext();
108             processTestCase(tc, ctx);
109
110
111
112
113         } catch (Exception e) {
114             e.printStackTrace();
115         }
116     }
117
118
119     @Test
120     public void testPutFailure() {
121         try {
122
123             String propertyfileName = "APPC/DownloadIsbcConfig/Put_Failure.properties";
124
125             // Register Call graphs
126             String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
127
128             Map<String, Object> serviceReferences = new HashMap<String, Object>();
129
130
131
132
133             GraphKey  graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
134             DGTestCase tc = new DGTestCase(graphKey);
135
136
137             tc.setInjectGraphXmls(injectGraphXmls);
138             tc.setServiceReferences(serviceReferences);
139             tc.setPropertyfileName(propertyfileName);
140
141
142
143             SvcLogicContext ctx = new SvcLogicContext();
144             processTestCase(tc, ctx);
145
146
147
148
149         } catch (Exception e) {
150             e.printStackTrace();
151         }
152     }
153
154 */
155
156 }