2 * ============LICENSE_START=======================================================
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
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 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 * ============LICENSE_END=========================================================
25 package org.onap.appc.dg;
28 import java.util.HashMap;
31 import org.junit.Test;
32 import org.onap.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
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;
39 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
40 import com.att.eelf.configuration.EELFLogger;
41 import com.att.eelf.configuration.EELFManager;
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";
49 public void testDownloadIsbcConfigSuccess() {
52 String propertyfileName = "APPC/DownloadIsbcConfig/DownloadIsbcConfig_Success.properties";
54 // Register Call graphs
55 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
57 Map<String, Object> serviceReferences = new HashMap<String, Object>();
62 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
63 DGTestCase tc = new DGTestCase(graphKey);
66 tc.setInjectGraphXmls(injectGraphXmls);
67 tc.setServiceReferences(serviceReferences);
68 tc.setPropertyfileName(propertyfileName);
72 SvcLogicContext ctx = new SvcLogicContext();
73 processTestCase(tc, ctx);
78 } catch (Exception e) {
85 public void testConfigFileFailure() {
88 String propertyfileName = "APPC/DownloadIsbcConfig/ConfigFile_Failure.properties";
90 // Register Call graphs
91 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
93 Map<String, Object> serviceReferences = new HashMap<String, Object>();
97 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
98 DGTestCase tc = new DGTestCase(graphKey);
101 tc.setInjectGraphXmls(injectGraphXmls);
102 tc.setServiceReferences(serviceReferences);
103 tc.setPropertyfileName(propertyfileName);
107 SvcLogicContext ctx = new SvcLogicContext();
108 processTestCase(tc, ctx);
113 } catch (Exception e) {
120 public void testPutFailure() {
123 String propertyfileName = "APPC/DownloadIsbcConfig/Put_Failure.properties";
125 // Register Call graphs
126 String injectGraphXmls[] = new String[] { DownloadIsbcConfigXML };
128 Map<String, Object> serviceReferences = new HashMap<String, Object>();
133 GraphKey graphKey = new GraphKey("APPC", null, "DownloadIsbcConfig", null);
134 DGTestCase tc = new DGTestCase(graphKey);
137 tc.setInjectGraphXmls(injectGraphXmls);
138 tc.setServiceReferences(serviceReferences);
139 tc.setPropertyfileName(propertyfileName);
143 SvcLogicContext ctx = new SvcLogicContext();
144 processTestCase(tc, ctx);
149 } catch (Exception e) {