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.openecomp.appc.dg;
24 import static org.junit.Assert.*;
26 import java.util.HashMap;
29 import org.junit.Before;
30 import org.junit.Test;
31 import org.mockito.Mockito;
32 import org.openecomp.appc.dg.mock.instance.MockConfigureNodeExecutor;
33 import org.openecomp.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
34 import org.osgi.framework.BundleContext;
35 import org.osgi.framework.FrameworkUtil;
36 import org.powermock.api.mockito.PowerMockito;
37 import org.slf4j.Logger;
38 import org.slf4j.LoggerFactory;
40 import com.att.eelf.configuration.EELFLogger;
41 import com.att.eelf.configuration.EELFManager;
42 /* need move to open source
43 import org.apache.sling.testing.mock.osgi.MockOsgi;
44 import com.att.sdnctl.dgtestlibrary.AbstractDGTestCase;
45 import com.att.sdnctl.dgtestlibrary.DGTestCase;
46 import com.att.sdnctl.dgtestlibrary.GraphKey;
48 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
49 import org.onap.ccsdk.sli.core.sli.provider.ExecuteNodeExecutor;
50 import org.onap.ccsdk.sli.core.sli.provider.SvcLogicAdaptorFactory;
53 public class TestGetVfModuleInfo /* extends AbstractDGTestCase */ {
55 //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class);
58 private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestGetVfModuleInfo.class);
59 public static String GetVfModuleInfoXML = "src/main/resources/xml/APPC_GetVfModuleInfo.xml";
64 public void testGetVfModuleInfoSuccess() {
67 String propertyfileName = "APPC/GetVfModuleInfo/GetVfModuleInfo_Success.properties";
68 Map<String, Object> serviceReferences = new HashMap<String, Object>();
70 // Register Call graphs
71 String injectGraphXmls[] = new String[] { GetVfModuleInfoXML };
74 GraphKey graphKey = new GraphKey("APPC", null, "GetVfModuleInfo", null);
75 DGTestCase tc = new DGTestCase(graphKey);
76 tc.setInjectGraphXmls(injectGraphXmls);
77 tc.setServiceReferences(serviceReferences);
78 tc.setPropertyfileName(propertyfileName);
80 SvcLogicContext ctx = new SvcLogicContext();
81 processTestCase(tc, ctx);
84 } catch (Exception e) {
94 public void testGetVfModuleInfoFailure() {
97 String propertyfileName = "APPC/GetVfModuleInfo/GetVfModuleInfo_Failure.properties";
98 Map<String, Object> serviceReferences = new HashMap<String, Object>();
100 // Register Call graphs
101 String injectGraphXmls[] = new String[] { GetVfModuleInfoXML };
104 GraphKey graphKey = new GraphKey("APPC", null, "GetVfModuleInfo", null);
105 DGTestCase tc = new DGTestCase(graphKey);
106 tc.setInjectGraphXmls(injectGraphXmls);
107 tc.setServiceReferences(serviceReferences);
108 tc.setPropertyfileName(propertyfileName);
110 SvcLogicContext ctx = new SvcLogicContext();
111 processTestCase(tc, ctx);
114 } catch (Exception e) {