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 mockclient = Mockito.mock(ManualClientEnd.class);
99 Session mockSession = Mockito.mock(Session.class);
101 Mockito.doNothing().when(mockclient).onMessage(message,mockSession);
102 mockclient.onMessage(message,mockSession);
106 * Run the void onOpen(Session) method test.
110 * @generatedBy CodePro at 6/1/16 1:41 PM
113 public void testOnOpen()
115 ManualClientEnd fixture = Mockito.mock(ManualClientEnd.class);
116 Session mockSession = Mockito.mock(Session.class);
118 fixture.onOpen(mockSession);
123 * Run the PDPNotification result(NotificationScheme) method test.
127 * @generatedBy CodePro at 6/1/16 1:41 PM
130 public void testResult_1()
132 NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
134 PDPNotification result = ManualClientEnd.result(scheme);
141 * Run the void start(String) method test.
145 * @generatedBy CodePro at 6/1/16 1:41 PM
148 public void testStart_1()
152 ManualClientEnd.start(url);
157 * Perform pre-test initialization.
160 * if the initialization fails for some reason
162 * @generatedBy CodePro at 6/1/16 1:41 PM
167 // add additional set up code here
171 * Perform post-test clean-up.
174 * if the clean-up fails for some reason
176 * @generatedBy CodePro at 6/1/16 1:41 PM
179 public void tearDown()
181 // Add additional tear down code here
187 * @param args the command line arguments
189 * @generatedBy CodePro at 6/1/16 1:41 PM
191 public static void main(String[] args) {
192 new org.junit.runner.JUnitCore().run(ManualClientEndTest.class);