Update license header in appc-dg files
[appc.git] / appc-directed-graph / appc-dgraph / provider / src / test / java / org / onap / appc / dg / TestGenerateTemplateConfig.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017-2018 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  * ============LICENSE_END=========================================================
22  */
23
24 package org.onap.appc.dg;
25
26
27 import static org.junit.Assert.*;
28
29 import java.util.HashMap;
30 import java.util.Map;
31
32 import org.junit.Test;
33 import org.onap.appc.dg.mock.instance.MockConfigureNodeExecutor;
34 import org.onap.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
35
36 import com.att.eelf.configuration.EELFLogger;
37 import com.att.eelf.configuration.EELFManager;
38 /* need to move to opensource
39 import org.onap.sdnc.dgtestlibrary.AbstractDGTestCase;
40 import org.onap.sdnc.dgtestlibrary.DGTestCase;
41 import org.onap.sdnc.dgtestlibrary.GraphKey;
42 */
43 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
44
45 public class TestGenerateTemplateConfig /* extends AbstractDGTestCase */ {
46     private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGenerateTemplateConfig.class);
47 /*
48     public static String generateConfigXML = "src/main/resources/xml/APPC_GenerateTemplateConfig.xml";
49
50     @Test
51     public void testGenerateTemplateConfigWithParameters() {
52         try {
53
54             String propertyfileName = "APPC/GenerateTemplateConfig/GenerateTemplateConfigWithParams.properties";
55             Map<String, Object> serviceReferences = new HashMap<String, Object>();
56
57
58             serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin());
59             serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode());
60
61             // Register Call graphs
62             String injectGraphXmls[] = new String[] { generateConfigXML };
63
64             GraphKey  graphKey = new GraphKey("APPC", null, "GenerateTemplateConfig", null);
65             DGTestCase tc = new DGTestCase(graphKey);
66             tc.setInjectGraphXmls(injectGraphXmls);
67             tc.setServiceReferences(serviceReferences);
68             tc.setPropertyfileName(propertyfileName);
69
70             SvcLogicContext ctx = new SvcLogicContext();
71             processTestCase(tc, ctx);
72
73
74
75         } catch (Exception e) {
76             e.printStackTrace();
77         }
78     }
79
80
81
82     @Test
83     public void testGenerateTemplateConfigWithNoParameters() {
84         try {
85
86             String propertyfileName = "APPC/GenerateTemplateConfig/GenerateTemplateConfigNoParams.properties";
87             Map<String, Object> serviceReferences = new HashMap<String, Object>();
88
89
90             serviceReferences.put("org.onap.appc.data.services.node.ConfigResourceNode", new MockSvcLogicJavaPlugin());
91             serviceReferences.put("org.onap.sdnc.config.generator.merge.MergeNode", new org.onap.sdnc.config.generator.merge.MergeNode());
92
93             // Register Call graphs
94             String injectGraphXmls[] = new String[] { generateConfigXML };
95
96             GraphKey  graphKey = new GraphKey("APPC", null, "GenerateTemplateConfig", null);
97             DGTestCase tc = new DGTestCase(graphKey);
98             tc.setInjectGraphXmls(injectGraphXmls);
99             tc.setServiceReferences(serviceReferences);
100             tc.setPropertyfileName(propertyfileName);
101
102             SvcLogicContext ctx = new SvcLogicContext();
103             processTestCase(tc, ctx);
104
105
106
107
108         } catch (Exception e) {
109             e.printStackTrace();
110         }
111     }
112
113 */
114
115 }