2 * ============LICENSE_START=======================================================
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * ============LICENSE_END=========================================================
24 package org.onap.appc.dg;
27 import java.util.HashMap;
30 import org.junit.Test;
31 import org.onap.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
33 /* need to move to open source
34 import org.onap.sdnc.dgtestlibrary.AbstractDGTestCase;
35 import org.onap.sdnc.dgtestlibrary.DGTestCase;
36 import org.onap.sdnc.dgtestlibrary.GraphKey;
38 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
39 import com.att.eelf.configuration.EELFLogger;
40 import com.att.eelf.configuration.EELFManager;
42 public class TestDownloadIsbcConfig /* extends AbstractDGTestCase */{
43 private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestDownloadIsbcConfig.class);
44 public static String DownloadIsbcConfigXML = "src/main/resources/xml/APPC_DownloadIsbcConfig.xml";
48 public void testDownloadIsbcConfigSuccess() {
51 String propertyfileName = "APPC/DownloadIsbcConfig/DownloadIsbcConfig_Success.properties";
53 // Register Call graphs
54 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
56 Map<String, Object> serviceReferences = new HashMap<String, Object>();
61 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
62 DGTestCase tc = new DGTestCase(graphKey);
65 tc.setInjectGraphXmls(injectGraphXmls);
66 tc.setServiceReferences(serviceReferences);
67 tc.setPropertyfileName(propertyfileName);
71 SvcLogicContext ctx = new SvcLogicContext();
72 processTestCase(tc, ctx);
77 } catch (Exception e) {
84 public void testConfigFileFailure() {
87 String propertyfileName = "APPC/DownloadIsbcConfig/ConfigFile_Failure.properties";
89 // Register Call graphs
90 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
92 Map<String, Object> serviceReferences = new HashMap<String, Object>();
96 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
97 DGTestCase tc = new DGTestCase(graphKey);
100 tc.setInjectGraphXmls(injectGraphXmls);
101 tc.setServiceReferences(serviceReferences);
102 tc.setPropertyfileName(propertyfileName);
106 SvcLogicContext ctx = new SvcLogicContext();
107 processTestCase(tc, ctx);
112 } catch (Exception e) {
119 public void testPutFailure() {
122 String propertyfileName = "APPC/DownloadIsbcConfig/Put_Failure.properties";
124 // Register Call graphs
125 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
127 Map<String, Object> serviceReferences = new HashMap<String, Object>();
132 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
133 DGTestCase tc = new DGTestCase(graphKey);
136 tc.setInjectGraphXmls(injectGraphXmls);
137 tc.setServiceReferences(serviceReferences);
138 tc.setPropertyfileName(propertyfileName);
142 SvcLogicContext ctx = new SvcLogicContext();
143 processTestCase(tc, ctx);
148 } catch (Exception e) {