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.onap.policy.std.test;
23 import java.util.LinkedList;
24 import java.util.List;
27 import org.onap.policy.api.NotificationHandler;
28 import org.onap.policy.api.NotificationScheme;
29 import org.onap.policy.std.AutoClientUEB;
31 import static org.junit.Assert.*;
34 * The class <code>AutoClientUEBTest</code> contains tests for the class <code>{@link AutoClientUEB}</code>.
36 * @generatedBy CodePro at 6/1/16 1:40 PM
37 * @version $Revision: 1.0 $
39 public class AutoClientUEBTest {
41 * Run the AutoClientUEB(String,List<String>) constructor test.
45 * @generatedBy CodePro at 6/1/16 1:40 PM
48 public void testAutoClientUEB_1()
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()
76 String result = AutoClientUEB.getNotficationType();
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
85 * Run the boolean getStatus() method test.
89 * @generatedBy CodePro at 6/1/16 1:40 PM
92 public void testGetStatus_1()
95 boolean result = AutoClientUEB.getStatus();
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
104 * Run the String getURL() method test.
108 * @generatedBy CodePro at 6/1/16 1:40 PM
111 public void testGetURL_1()
114 String result = AutoClientUEB.getURL();
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);
123 * Run the void setScheme(NotificationScheme) method test.
127 * @generatedBy CodePro at 6/1/16 1:40 PM
130 public void testSetScheme_1()
132 NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
134 AutoClientUEB.setScheme(scheme);
136 // add additional test code here
137 // An unexpected exception was thrown in user code while executing this test:
138 // java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
142 * Perform pre-test initialization.
145 * if the initialization fails for some reason
147 * @generatedBy CodePro at 6/1/16 1:40 PM
152 // add set up code here
153 List<String> urlList = new LinkedList<String>();
154 urlList.add("test2.com");
155 @SuppressWarnings("unused")
156 AutoClientUEB client = new AutoClientUEB("test.com", urlList, "testKey", "testSecret");
157 NotificationHandler handler = null;
158 AutoClientUEB.setAuto(NotificationScheme.AUTO_ALL_NOTIFICATIONS, handler);
162 * Perform post-test clean-up.
165 * if the clean-up fails for some reason
167 * @generatedBy CodePro at 6/1/16 1:40 PM
170 public void tearDown()
172 // Add additional tear down code here
178 * @param args the command line arguments
180 * @generatedBy CodePro at 6/1/16 1:40 PM
182 public static void main(String[] args) {
183 new org.junit.runner.JUnitCore().run(AutoClientUEBTest.class);