Update license header in appc-dg files
[appc.git] / appc-directed-graph / appc-dgraph / provider / src / test / java / org / onap / appc / dg / TestSetStatus.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.Before;
33 import org.junit.Test;
34 import org.mockito.Mockito;
35 import org.onap.appc.dg.mock.instance.MockConfigureNodeExecutor;
36 import org.onap.appc.dg.mock.instance.MockSvcLogicJavaPlugin;
37 import org.osgi.framework.BundleContext;
38 import org.osgi.framework.FrameworkUtil;
39 import org.powermock.api.mockito.PowerMockito;
40 import org.slf4j.Logger;
41 import org.slf4j.LoggerFactory;
42
43 import com.att.eelf.configuration.EELFLogger;
44 import com.att.eelf.configuration.EELFManager;
45 /* need to move to open source
46 import org.apache.sling.testing.mock.osgi.MockOsgi;
47 import org.onap.sdnc.dgtestlibrary.AbstractDGTestCase;
48 import org.onap.sdnc.dgtestlibrary.DGTestCase;
49 import org.onap.sdnc.dgtestlibrary.GraphKey;
50 */
51 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
52 import org.onap.ccsdk.sli.core.sli.provider.ExecuteNodeExecutor;
53 import org.onap.ccsdk.sli.core.sli.provider.SvcLogicAdaptorFactory;
54
55
56 public class TestSetStatus /* extends AbstractDGTestCase */ {
57     //private final static Logger logger = LoggerFactory.getLogger(TestGetParams.class);
58     private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestSetStatus.class);
59     public static String SetStatusXML = "src/main/resources/xml/APPC_SetStatus.xml";
60
61
62 /*
63     @Test
64     public void testSetStatusSuccess() {
65         try {
66
67             String propertyfileName = "APPC/SetStatus/SetStatus_Success.properties";
68             Map<String, Object> serviceReferences = new HashMap<String, Object>();
69
70
71
72             // Register Call graphs
73             String injectGraphXmls[] = new String[] { SetStatusXML };
74
75
76             GraphKey  graphKey = new GraphKey("APPC", null, "SetStatus", null);
77             DGTestCase tc = new DGTestCase(graphKey);
78             tc.setInjectGraphXmls(injectGraphXmls);
79             tc.setServiceReferences(serviceReferences);
80             tc.setPropertyfileName(propertyfileName);
81
82             SvcLogicContext ctx = new SvcLogicContext();
83             processTestCase(tc, ctx);
84
85
86         } catch (Exception e) {
87             e.printStackTrace();
88         }
89
90     }
91
92
93
94
95     @Test
96     public void testSetStatusAaiFailure() {
97         try {
98
99             String propertyfileName = "APPC/SetStatus/SetStatus_AaiFailure.properties";
100             Map<String, Object> serviceReferences = new HashMap<String, Object>();
101
102
103
104             // Register Call graphs
105             String injectGraphXmls[] = new String[] { SetStatusXML };
106
107
108             GraphKey  graphKey = new GraphKey("APPC", null, "SetStatus", null);
109             DGTestCase tc = new DGTestCase(graphKey);
110             tc.setInjectGraphXmls(injectGraphXmls);
111             tc.setServiceReferences(serviceReferences);
112             tc.setPropertyfileName(propertyfileName);
113
114             SvcLogicContext ctx = new SvcLogicContext();
115             processTestCase(tc, ctx);
116
117
118         } catch (Exception e) {
119             e.printStackTrace();
120         }
121
122     }
123
124
125     @Test
126     public void testSetStatusFailure() {
127         try {
128
129             String propertyfileName = "APPC/SetStatus/SetStatus_SaveRunningFailure.properties";
130             Map<String, Object> serviceReferences = new HashMap<String, Object>();
131
132
133
134             // Register Call graphs
135             String injectGraphXmls[] = new String[] { SetStatusXML };
136
137
138             GraphKey  graphKey = new GraphKey("APPC", null, "SetStatus", null);
139             DGTestCase tc = new DGTestCase(graphKey);
140             tc.setInjectGraphXmls(injectGraphXmls);
141             tc.setServiceReferences(serviceReferences);
142             tc.setPropertyfileName(propertyfileName);
143
144             SvcLogicContext ctx = new SvcLogicContext();
145             processTestCase(tc, ctx);
146
147
148         } catch (Exception e) {
149             e.printStackTrace();
150         }
151
152     }
153
154
155 */
156
157 }