2 * ============LICENSE_START=======================================================
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
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.
20 * ============LICENSE_END=========================================================
23 package org.onap.policy.std.test;
25 import java.util.LinkedList;
26 import java.util.List;
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.*;
34 * The class <code>AutoClientUEBTest</code> contains tests for the class
35 * <code>{@link AutoClientUEB}</code>.
37 * @generatedBy CodePro at 6/1/16 1:40 PM
38 * @version $Revision: 1.0 $
40 public class AutoClientUEBTest {
42 * Run the AutoClientUEB(String,List<String>) constructor test.
46 * @generatedBy CodePro at 6/1/16 1:40 PM
49 public void testAutoClientUEB_1() throws Exception {
52 String apiSecret = "";
53 List<String> uebURLList = new LinkedList<String>();
55 AutoClientUEB result = new AutoClientUEB(url, uebURLList, apiKey, apiSecret);
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);
66 * Run the String getNotficationType() method test.
70 * @generatedBy CodePro at 6/1/16 1:40 PM
73 public void testGetNotficationType_1() throws Exception {
75 String result = AutoClientUEB.getNotficationType();
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
85 * Run the boolean getStatus() method test.
89 * @generatedBy CodePro at 6/1/16 1:40 PM
92 public void testGetStatus_1() throws Exception {
94 boolean result = AutoClientUEB.getStatus();
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
104 * Run the String getURL() method test.
108 * @generatedBy CodePro at 6/1/16 1:40 PM
111 public void testGetURL_1() throws Exception {
113 String result = AutoClientUEB.getURL();
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);
123 * Run the void setScheme(NotificationScheme) method test.
127 * @generatedBy CodePro at 6/1/16 1:40 PM
130 public void testSetScheme_1() throws Exception {
131 NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
133 AutoClientUEB.setScheme(scheme);
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
142 * Perform pre-test initialization.
144 * @throws Exception if the initialization fails for some reason
146 * @generatedBy CodePro at 6/1/16 1:40 PM
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);
160 * Perform post-test clean-up.
162 * @throws Exception if the clean-up fails for some reason
164 * @generatedBy CodePro at 6/1/16 1:40 PM
167 public void tearDown() throws Exception {
168 // Add additional tear down code here
174 * @param args the command line arguments
176 * @generatedBy CodePro at 6/1/16 1:40 PM
178 public static void main(String[] args) {
179 new org.junit.runner.JUnitCore().run(AutoClientUEBTest.class);