[POLICY-73] replace openecomp for policy-engine
[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  * 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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.policy.std.test;
22
23 import java.util.LinkedList;
24 import java.util.List;
25
26 import org.junit.*;
27 import org.onap.policy.api.NotificationHandler;
28 import org.onap.policy.api.NotificationScheme;
29 import org.onap.policy.std.AutoClientUEB;
30
31 import static org.junit.Assert.*;
32
33 /**
34  * The class <code>AutoClientUEBTest</code> contains tests for the class <code>{@link AutoClientUEB}</code>.
35  *
36  * @generatedBy CodePro at 6/1/16 1:40 PM
37  * @version $Revision: 1.0 $
38  */
39 public class AutoClientUEBTest {
40         /**
41          * Run the AutoClientUEB(String,List<String>) constructor test.
42          *
43          * @throws Exception
44          *
45          * @generatedBy CodePro at 6/1/16 1:40 PM
46          */
47         @Test
48         public void testAutoClientUEB_1()
49                 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()
74                 throws Exception {
75
76                 String result = AutoClientUEB.getNotficationType();
77
78                 // add additional test code here
79                 // An unexpected exception was thrown in user code while executing this test:
80                 //    java.lang.NoClassDefFoundError: Could not initialize class 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()
93                 throws Exception {
94
95                 boolean result = AutoClientUEB.getStatus();
96
97                 // add additional test code here
98                 // An unexpected exception was thrown in user code while executing this test:
99                 //    java.lang.NoClassDefFoundError: Could not initialize class 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()
112                 throws Exception {
113
114                 String result = AutoClientUEB.getURL();
115
116                 // add additional test code here
117                 // An unexpected exception was thrown in user code while executing this test:
118                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
119                 assertNotNull(result);
120         }
121
122         /**
123          * Run the boolean isRunning() method test.
124          *
125          * @throws Exception
126          *
127          * @generatedBy CodePro at 6/1/16 1:40 PM
128          */
129         @Test
130         public void testIsRunning_1()
131                 throws Exception {
132                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
133                 fixture.isRunning = true;
134
135                 boolean result = fixture.isRunning();
136
137                 // add additional test code here
138                 // An unexpected exception was thrown in user code while executing this test:
139                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
140                 assertTrue(result);
141         }
142
143         /**
144          * Run the void run() method test.
145          *
146          * @throws Exception
147          *
148          * @generatedBy CodePro at 6/1/16 1:40 PM
149          */
150         @Test
151         public void testRun_1()
152                 throws Exception {
153                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
154                 fixture.isRunning = true;
155
156                 fixture.run();
157
158                 // add additional test code here
159                 // An unexpected exception was thrown in user code while executing this test:
160                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
161         }
162
163         /**
164          * Run the void run() method test.
165          *
166          * @throws Exception
167          *
168          * @generatedBy CodePro at 6/1/16 1:40 PM
169          */
170         @Test
171         public void testRun_2()
172                 throws Exception {
173                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
174                 fixture.isRunning = true;
175
176                 fixture.run();
177
178                 // add additional test code here
179                 // An unexpected exception was thrown in user code while executing this test:
180                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
181         }
182
183         /**
184          * Run the void run() method test.
185          *
186          * @throws Exception
187          *
188          * @generatedBy CodePro at 6/1/16 1:40 PM
189          */
190         @Test
191         public void testRun_3()
192                 throws Exception {
193                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
194                 fixture.isRunning = true;
195
196                 fixture.run();
197
198                 // add additional test code here
199                 // An unexpected exception was thrown in user code while executing this test:
200                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
201         }
202
203         /**
204          * Run the void run() method test.
205          *
206          * @throws Exception
207          *
208          * @generatedBy CodePro at 6/1/16 1:40 PM
209          */
210         @Test
211         public void testRun_4()
212                 throws Exception {
213                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
214                 fixture.isRunning = true;
215
216                 fixture.run();
217
218                 // add additional test code here
219                 // An unexpected exception was thrown in user code while executing this test:
220                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
221         }
222
223         /**
224          * Run the void run() method test.
225          *
226          * @throws Exception
227          *
228          * @generatedBy CodePro at 6/1/16 1:40 PM
229          */
230         @Test
231         public void testRun_5()
232                 throws Exception {
233                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
234                 fixture.isRunning = true;
235
236                 fixture.run();
237
238                 // add additional test code here
239                 // An unexpected exception was thrown in user code while executing this test:
240                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
241         }
242
243         /**
244          * Run the void run() method test.
245          *
246          * @throws Exception
247          *
248          * @generatedBy CodePro at 6/1/16 1:40 PM
249          */
250         @Test
251         public void testRun_6()
252                 throws Exception {
253                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
254                 fixture.isRunning = true;
255
256                 fixture.run();
257
258                 // add additional test code here
259                 // An unexpected exception was thrown in user code while executing this test:
260                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
261         }
262
263         /**
264          * Run the void run() method test.
265          *
266          * @throws Exception
267          *
268          * @generatedBy CodePro at 6/1/16 1:40 PM
269          */
270         @Test
271         public void testRun_7()
272                 throws Exception {
273                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
274                 fixture.isRunning = true;
275
276                 fixture.run();
277
278                 // add additional test code here
279                 // An unexpected exception was thrown in user code while executing this test:
280                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
281         }
282
283         /**
284          * Run the void run() method test.
285          *
286          * @throws Exception
287          *
288          * @generatedBy CodePro at 6/1/16 1:40 PM
289          */
290         @Test
291         public void testRun_8()
292                 throws Exception {
293                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
294                 fixture.isRunning = true;
295
296                 fixture.run();
297
298                 // add additional test code here
299                 // An unexpected exception was thrown in user code while executing this test:
300                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
301         }
302
303         /**
304          * Run the void run() method test.
305          *
306          * @throws Exception
307          *
308          * @generatedBy CodePro at 6/1/16 1:40 PM
309          */
310         @Test
311         public void testRun_9()
312                 throws Exception {
313                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
314                 fixture.isRunning = true;
315
316                 fixture.run();
317
318                 // add additional test code here
319                 // An unexpected exception was thrown in user code while executing this test:
320                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
321         }
322
323         /**
324          * Run the void run() method test.
325          *
326          * @throws Exception
327          *
328          * @generatedBy CodePro at 6/1/16 1:40 PM
329          */
330         @Test
331         public void testRun_10()
332                 throws Exception {
333                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
334                 fixture.isRunning = true;
335
336                 fixture.run();
337
338                 // add additional test code here
339                 // An unexpected exception was thrown in user code while executing this test:
340                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
341         }
342
343         /**
344          * Run the void run() method test.
345          *
346          * @throws Exception
347          *
348          * @generatedBy CodePro at 6/1/16 1:40 PM
349          */
350         @Test
351         public void testRun_11()
352                 throws Exception {
353                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
354                 fixture.isRunning = true;
355
356                 fixture.run();
357
358                 // add additional test code here
359                 // An unexpected exception was thrown in user code while executing this test:
360                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
361         }
362
363         /**
364          * Run the void run() method test.
365          *
366          * @throws Exception
367          *
368          * @generatedBy CodePro at 6/1/16 1:40 PM
369          */
370         @Test
371         public void testRun_12()
372                 throws Exception {
373                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
374                 fixture.isRunning = true;
375
376                 fixture.run();
377
378                 // add additional test code here
379                 // An unexpected exception was thrown in user code while executing this test:
380                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
381         }
382
383         /**
384          * Run the void run() method test.
385          *
386          * @throws Exception
387          *
388          * @generatedBy CodePro at 6/1/16 1:40 PM
389          */
390         @Test
391         public void testRun_13()
392                 throws Exception {
393                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
394                 fixture.isRunning = true;
395
396                 fixture.run();
397
398                 // add additional test code here
399                 // An unexpected exception was thrown in user code while executing this test:
400                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
401         }
402
403         /**
404          * Run the void run() method test.
405          *
406          * @throws Exception
407          *
408          * @generatedBy CodePro at 6/1/16 1:40 PM
409          */
410         @Test
411         public void testRun_14()
412                 throws Exception {
413                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
414                 fixture.isRunning = true;
415
416                 fixture.run();
417
418                 // add additional test code here
419                 // An unexpected exception was thrown in user code while executing this test:
420                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
421         }
422
423         /**
424          * Run the void run() method test.
425          *
426          * @throws Exception
427          *
428          * @generatedBy CodePro at 6/1/16 1:40 PM
429          */
430         @Test
431         public void testRun_15()
432                 throws Exception {
433                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
434                 fixture.isRunning = true;
435
436                 fixture.run();
437
438                 // add additional test code here
439                 // An unexpected exception was thrown in user code while executing this test:
440                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
441         }
442
443         /**
444          * Run the void run() method test.
445          *
446          * @throws Exception
447          *
448          * @generatedBy CodePro at 6/1/16 1:40 PM
449          */
450         @Test
451         public void testRun_16()
452                 throws Exception {
453                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
454                 fixture.isRunning = true;
455
456                 fixture.run();
457
458                 // add additional test code here
459                 // An unexpected exception was thrown in user code while executing this test:
460                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
461         }
462
463         /**
464          * Run the void setAuto(NotificationScheme,NotificationHandler) method test.
465          *
466          * @throws Exception
467          *
468          * @generatedBy CodePro at 6/1/16 1:40 PM
469          */
470         @Test
471         public void testSetAuto_1()
472                 throws Exception {
473                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
474                 fixture.isRunning = true;
475                 NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
476                 NotificationHandler handler = null;
477
478                 fixture.setAuto(scheme, handler);
479
480                 // add additional test code here
481                 // An unexpected exception was thrown in user code while executing this test:
482                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
483         }
484
485         /**
486          * Run the void setScheme(NotificationScheme) method test.
487          *
488          * @throws Exception
489          *
490          * @generatedBy CodePro at 6/1/16 1:40 PM
491          */
492         @Test
493         public void testSetScheme_1()
494                 throws Exception {
495                 NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
496
497                 AutoClientUEB.setScheme(scheme);
498
499                 // add additional test code here
500                 // An unexpected exception was thrown in user code while executing this test:
501                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
502         }
503
504         /**
505          * Run the void terminate() method test.
506          *
507          * @throws Exception
508          *
509          * @generatedBy CodePro at 6/1/16 1:40 PM
510          */
511         @Test
512         public void testTerminate_1()
513                 throws Exception {
514                 AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
515                 fixture.isRunning = true;
516
517                 fixture.terminate();
518
519                 // add additional test code here
520                 // An unexpected exception was thrown in user code while executing this test:
521                 //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
522         }
523
524         /**
525          * Perform pre-test initialization.
526          *
527          * @throws Exception
528          *         if the initialization fails for some reason
529          *
530          * @generatedBy CodePro at 6/1/16 1:40 PM
531          */
532         @Before
533         public void setUp()
534                 throws Exception {
535                 // add set up code here
536                 List<String> urlList = new LinkedList<String>();
537                 urlList.add("test2.com");
538                 AutoClientUEB client = new AutoClientUEB("test.com", urlList, "testKey", "testSecret");
539                 NotificationHandler handler = null;
540                 client.setAuto(NotificationScheme.AUTO_ALL_NOTIFICATIONS, handler);
541         }
542
543         /**
544          * Perform post-test clean-up.
545          *
546          * @throws Exception
547          *         if the clean-up fails for some reason
548          *
549          * @generatedBy CodePro at 6/1/16 1:40 PM
550          */
551         @After
552         public void tearDown()
553                 throws Exception {
554                 // Add additional tear down code here
555         }
556
557         /**
558          * Launch the test.
559          *
560          * @param args the command line arguments
561          *
562          * @generatedBy CodePro at 6/1/16 1:40 PM
563          */
564         public static void main(String[] args) {
565                 new org.junit.runner.JUnitCore().run(AutoClientUEBTest.class);
566         }
567 }