2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.appc.dg;
24 import java.util.HashMap;
27 import org.junit.Test;
28 import org.onap.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
30 /* need to move to open source
31 import com.att.sdnctl.dgtestlibrary.AbstractDGTestCase;
32 import com.att.sdnctl.dgtestlibrary.DGTestCase;
33 import com.att.sdnctl.dgtestlibrary.GraphKey;
35 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
36 import com.att.eelf.configuration.EELFLogger;
37 import com.att.eelf.configuration.EELFManager;
39 public class TestDownloadIsbcConfig /* extends AbstractDGTestCase */{
40 private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestDownloadIsbcConfig.class);
41 public static String DownloadIsbcConfigXML = "src/main/resources/xml/APPC_DownloadIsbcConfig.xml";
45 public void testDownloadIsbcConfigSuccess() {
48 String propertyfileName = "APPC/DownloadIsbcConfig/DownloadIsbcConfig_Success.properties";
50 // Register Call graphs
51 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
53 Map<String, Object> serviceReferences = new HashMap<String, Object>();
58 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
59 DGTestCase tc = new DGTestCase(graphKey);
62 tc.setInjectGraphXmls(injectGraphXmls);
63 tc.setServiceReferences(serviceReferences);
64 tc.setPropertyfileName(propertyfileName);
68 SvcLogicContext ctx = new SvcLogicContext();
69 processTestCase(tc, ctx);
74 } catch (Exception e) {
81 public void testConfigFileFailure() {
84 String propertyfileName = "APPC/DownloadIsbcConfig/ConfigFile_Failure.properties";
86 // Register Call graphs
87 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
89 Map<String, Object> serviceReferences = new HashMap<String, Object>();
93 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
94 DGTestCase tc = new DGTestCase(graphKey);
97 tc.setInjectGraphXmls(injectGraphXmls);
98 tc.setServiceReferences(serviceReferences);
99 tc.setPropertyfileName(propertyfileName);
103 SvcLogicContext ctx = new SvcLogicContext();
104 processTestCase(tc, ctx);
109 } catch (Exception e) {
116 public void testPutFailure() {
119 String propertyfileName = "APPC/DownloadIsbcConfig/Put_Failure.properties";
121 // Register Call graphs
122 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
124 Map<String, Object> serviceReferences = new HashMap<String, Object>();
129 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
130 DGTestCase tc = new DGTestCase(graphKey);
133 tc.setInjectGraphXmls(injectGraphXmls);
134 tc.setServiceReferences(serviceReferences);
135 tc.setPropertyfileName(propertyfileName);
139 SvcLogicContext ctx = new SvcLogicContext();
140 processTestCase(tc, ctx);
145 } catch (Exception e) {