Reformat PolicyEngineAPI test cases
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / onap / policy / std / test / AutoClientUEBTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * PolicyEngineAPI
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Modifications Copyright (C) 2019 Samsung
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  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.policy.std.test;
24
25 import java.util.LinkedList;
26 import java.util.List;
27 import org.junit.*;
28 import org.onap.policy.api.NotificationHandler;
29 import org.onap.policy.api.NotificationScheme;
30 import org.onap.policy.std.AutoClientUEB;
31 import static org.junit.Assert.*;
32
33 /**
34  * The class <code>AutoClientUEBTest</code> contains tests for the class
35  * <code>{@link AutoClientUEB}</code>.
36  *
37  * @generatedBy CodePro at 6/1/16 1:40 PM
38  * @version $Revision: 1.0 $
39  */
40 public class AutoClientUEBTest {
41     /**
42      * Run the AutoClientUEB(String,List<String>) constructor test.
43      *
44      * @throws Exception
45      *
46      * @generatedBy CodePro at 6/1/16 1:40 PM
47      */
48     @Test
49     public void testAutoClientUEB_1() throws Exception {
50         String url = "";
51         String apiKey = "";
52         String apiSecret = "";
53         List<String> uebURLList = new LinkedList<String>();
54
55         AutoClientUEB result = new AutoClientUEB(url, uebURLList, apiKey, apiSecret);
56
57         // add additional test code here
58         // An unexpected exception was thrown in user code while executing this test:
59         // java.lang.ExceptionInInitializerError
60         // at org.apache.log4j.Logger.getLogger(Logger.java:104)
61         // at org.onap.policy.std.AutoClientUEB.<clinit>(AutoClientUEB.java:39)
62         assertNotNull(result);
63     }
64
65     /**
66      * Run the String getNotficationType() method test.
67      *
68      * @throws Exception
69      *
70      * @generatedBy CodePro at 6/1/16 1:40 PM
71      */
72     @Test
73     public void testGetNotficationType_1() throws Exception {
74
75         String result = AutoClientUEB.getNotficationType();
76
77         // add additional test code here
78         // An unexpected exception was thrown in user code while executing this test:
79         // java.lang.NoClassDefFoundError: Could not initialize class
80         // org.onap.policy.std.AutoClientUEB
81         assertNull(result);
82     }
83
84     /**
85      * Run the boolean getStatus() method test.
86      *
87      * @throws Exception
88      *
89      * @generatedBy CodePro at 6/1/16 1:40 PM
90      */
91     @Test
92     public void testGetStatus_1() throws Exception {
93
94         boolean result = AutoClientUEB.getStatus();
95
96         // add additional test code here
97         // An unexpected exception was thrown in user code while executing this test:
98         // java.lang.NoClassDefFoundError: Could not initialize class
99         // org.onap.policy.std.AutoClientUEB
100         assertFalse(result);
101     }
102
103     /**
104      * Run the String getURL() method test.
105      *
106      * @throws Exception
107      *
108      * @generatedBy CodePro at 6/1/16 1:40 PM
109      */
110     @Test
111     public void testGetURL_1() throws Exception {
112
113         String result = AutoClientUEB.getURL();
114
115         // add additional test code here
116         // An unexpected exception was thrown in user code while executing this test:
117         // java.lang.NoClassDefFoundError: Could not initialize class
118         // org.onap.policy.std.AutoClientUEB
119         assertNotNull(result);
120     }
121
122     /**
123      * Run the void setScheme(NotificationScheme) method test.
124      *
125      * @throws Exception
126      *
127      * @generatedBy CodePro at 6/1/16 1:40 PM
128      */
129     @Test
130     public void testSetScheme_1() throws Exception {
131         NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
132
133         AutoClientUEB.setScheme(scheme);
134
135         // add additional test code here
136         // An unexpected exception was thrown in user code while executing this test:
137         // java.lang.NoClassDefFoundError: Could not initialize class
138         // org.onap.policy.std.AutoClientUEB
139     }
140
141     /**
142      * Perform pre-test initialization.
143      *
144      * @throws Exception if the initialization fails for some reason
145      *
146      * @generatedBy CodePro at 6/1/16 1:40 PM
147      */
148     @Before
149     public void setUp() throws Exception {
150         // add set up code here
151         List<String> urlList = new LinkedList<String>();
152         urlList.add("test2.com");
153         @SuppressWarnings("unused")
154         AutoClientUEB client = new AutoClientUEB("test.com", urlList, "testKey", "testSecret");
155         NotificationHandler handler = null;
156         AutoClientUEB.setAuto(NotificationScheme.AUTO_ALL_NOTIFICATIONS, handler);
157     }
158
159     /**
160      * Perform post-test clean-up.
161      *
162      * @throws Exception if the clean-up fails for some reason
163      *
164      * @generatedBy CodePro at 6/1/16 1:40 PM
165      */
166     @After
167     public void tearDown() throws Exception {
168         // Add additional tear down code here
169     }
170
171     /**
172      * Launch the test.
173      *
174      * @param args the command line arguments
175      *
176      * @generatedBy CodePro at 6/1/16 1:40 PM
177      */
178     public static void main(String[] args) {
179         new org.junit.runner.JUnitCore().run(AutoClientUEBTest.class);
180     }
181 }