Policy 1707 commit to LF
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / openecomp / policy / std / test / ManualClientEndTest.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.openecomp.policy.std.test;
22
23 import javax.websocket.Session;
24
25 import org.junit.*;
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;
30
31 import static org.junit.Assert.*;
32
33 /**
34  * The class <code>ManualClientEndTest</code> contains tests for the class <code>{@link ManualClientEnd}</code>.
35  *
36  * @generatedBy CodePro at 6/1/16 1:41 PM
37  * @version $Revision: 1.0 $
38  */
39 public class ManualClientEndTest {
40         /**
41          * Run the ManualClientEnd() constructor test.
42          *
43          * @generatedBy CodePro at 6/1/16 1:41 PM
44          */
45         @Test
46         public void testManualClientEnd_1()
47                 throws Exception {
48                 ManualClientEnd result = new ManualClientEnd();
49                 assertNotNull(result);
50                 // add additional test code here
51         }
52
53         /**
54          * Run the void onClose(Session) method test.
55          *
56          * @throws Exception
57          *
58          * @generatedBy CodePro at 6/1/16 1:41 PM
59          */
60         @Test
61         public void testOnClose()
62                 throws Exception {
63                 ManualClientEnd fixture = Mockito.mock(ManualClientEnd.class);
64                 Session mockSession = Mockito.mock(Session.class);
65
66                 fixture.onClose(mockSession);
67
68         }
69
70         /**
71          * Run the void onError(Session,Throwable) method test.
72          *
73          * @throws Exception
74          *
75          * @generatedBy CodePro at 6/1/16 1:41 PM
76          */
77         @Test
78         public void testOnError()
79                 throws Exception {
80                 ManualClientEnd fixture = Mockito.mock(ManualClientEnd.class);
81                 Session mockSession = Mockito.mock(Session.class);
82                 Throwable e = new Throwable();
83
84                 fixture.onError(mockSession, e);
85         }
86
87         /**
88          * Run the void onMessage(String,Session) method test.
89          *
90          * @throws Exception
91          *
92          * @generatedBy CodePro at 6/1/16 1:41 PM
93          */
94         @Test
95         public void testOnMessage()
96                 throws Exception {
97                 ManualClientEnd mockclient = Mockito.mock(ManualClientEnd.class);
98                 String message = "";
99                 Session mockSession = Mockito.mock(Session.class);
100                 
101                 Mockito.doNothing().when(mockclient).onMessage(message,mockSession);
102                 mockclient.onMessage(message,mockSession);
103         }
104
105         /**
106          * Run the void onOpen(Session) method test.
107          *
108          * @throws Exception
109          *
110          * @generatedBy CodePro at 6/1/16 1:41 PM
111          */
112         @Test
113         public void testOnOpen()
114                 throws Exception {
115                 ManualClientEnd fixture = Mockito.mock(ManualClientEnd.class);
116                 Session mockSession = Mockito.mock(Session.class);
117
118                 fixture.onOpen(mockSession);
119
120         }
121
122         /**
123          * Run the PDPNotification result(NotificationScheme) method test.
124          *
125          * @throws Exception
126          *
127          * @generatedBy CodePro at 6/1/16 1:41 PM
128          */
129         @Test
130         public void testResult_1()
131                 throws Exception {
132                 NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
133
134                 PDPNotification result = ManualClientEnd.result(scheme);
135
136                 assertNull(result);
137         }
138
139
140         /**
141          * Run the void start(String) method test.
142          *
143          * @throws Exception
144          *
145          * @generatedBy CodePro at 6/1/16 1:41 PM
146          */
147         @Test
148         public void testStart_1()
149                 throws Exception {
150                 String url = "";
151
152                 ManualClientEnd.start(url);
153
154         }
155
156         /**
157          * Perform pre-test initialization.
158          *
159          * @throws Exception
160          *         if the initialization fails for some reason
161          *
162          * @generatedBy CodePro at 6/1/16 1:41 PM
163          */
164         @Before
165         public void setUp()
166                 throws Exception {
167                 // add additional set up code here
168         }
169
170         /**
171          * Perform post-test clean-up.
172          *
173          * @throws Exception
174          *         if the clean-up fails for some reason
175          *
176          * @generatedBy CodePro at 6/1/16 1:41 PM
177          */
178         @After
179         public void tearDown()
180                 throws Exception {
181                 // Add additional tear down code here
182         }
183
184         /**
185          * Launch the test.
186          *
187          * @param args the command line arguments
188          *
189          * @generatedBy CodePro at 6/1/16 1:41 PM
190          */
191         public static void main(String[] args) {
192                 new org.junit.runner.JUnitCore().run(ManualClientEndTest.class);
193         }
194 }