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.openecomp.policy.std.test;
23 import javax.websocket.Session;
26 import org.mockito.Mockito;
27 import org.openecomp.policy.api.NotificationScheme;
28 import org.openecomp.policy.api.PDPNotification;
29 import org.openecomp.policy.std.ManualClientEnd;
31 import static org.junit.Assert.*;
34 * The class <code>ManualClientEndTest</code> contains tests for the class <code>{@link ManualClientEnd}</code>.
36 * @generatedBy CodePro at 6/1/16 1:41 PM
37 * @version $Revision: 1.0 $
39 public class ManualClientEndTest {
41 * Run the ManualClientEnd() constructor test.
43 * @generatedBy CodePro at 6/1/16 1:41 PM
46 public void testManualClientEnd_1()
48 ManualClientEnd result = new ManualClientEnd();
49 assertNotNull(result);
50 // add additional test code here
54 * Run the void onClose(Session) method test.
58 * @generatedBy CodePro at 6/1/16 1:41 PM
61 public void testOnClose()
63 ManualClientEnd fixture = Mockito.mock(ManualClientEnd.class);
64 Session mockSession = Mockito.mock(Session.class);
66 fixture.onClose(mockSession);
71 * Run the void onError(Session,Throwable) method test.
75 * @generatedBy CodePro at 6/1/16 1:41 PM
78 public void testOnError()
80 ManualClientEnd fixture = Mockito.mock(ManualClientEnd.class);
81 Session mockSession = Mockito.mock(Session.class);
82 Throwable e = new Throwable();
84 fixture.onError(mockSession, e);
88 * Run the void onMessage(String,Session) method test.
92 * @generatedBy CodePro at 6/1/16 1:41 PM
95 public void testOnMessage()
97 ManualClientEnd fixture = new ManualClientEnd();
98 ManualClientEnd mockclient = Mockito.mock(ManualClientEnd.class);
100 Session mockSession = Mockito.mock(Session.class);
102 Mockito.doNothing().when(mockclient).onMessage(message,mockSession);
103 mockclient.onMessage(message,mockSession);
107 * Run the void onOpen(Session) method test.
111 * @generatedBy CodePro at 6/1/16 1:41 PM
114 public void testOnOpen()
116 ManualClientEnd fixture = Mockito.mock(ManualClientEnd.class);
117 Session mockSession = Mockito.mock(Session.class);
119 fixture.onOpen(mockSession);
124 * Run the PDPNotification result(NotificationScheme) method test.
128 * @generatedBy CodePro at 6/1/16 1:41 PM
131 public void testResult_1()
133 NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
135 PDPNotification result = ManualClientEnd.result(scheme);
142 * Run the void start(String) method test.
146 * @generatedBy CodePro at 6/1/16 1:41 PM
149 public void testStart_1()
153 ManualClientEnd.start(url);
158 * Perform pre-test initialization.
161 * if the initialization fails for some reason
163 * @generatedBy CodePro at 6/1/16 1:41 PM
168 // add additional set up code here
172 * Perform post-test clean-up.
175 * if the clean-up fails for some reason
177 * @generatedBy CodePro at 6/1/16 1:41 PM
180 public void tearDown()
182 // Add additional tear down code here
188 * @param args the command line arguments
190 * @generatedBy CodePro at 6/1/16 1:41 PM
192 public static void main(String[] args) {
193 new org.junit.runner.JUnitCore().run(ManualClientEndTest.class);