Initial OpenECOMP policy/engine commit
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / openecomp / policy / std / test / ManualClientEndUEBTest.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 java.util.LinkedList;
24 import java.util.List;
25
26 import org.junit.*;
27 import org.mockito.Mockito;
28 import org.mockito.invocation.InvocationOnMock;
29 import org.mockito.stubbing.Answer;
30 import org.openecomp.policy.api.NotificationScheme;
31 import org.openecomp.policy.api.PDPNotification;
32 import org.openecomp.policy.std.ManualClientEndUEB;
33 import org.openecomp.policy.std.NotificationUnMarshal;
34 import org.openecomp.policy.std.StdPDPNotification;
35
36 import static org.junit.Assert.*;
37
38 /**
39  * The class <code>ManualClientEndUEBTest</code> contains tests for the class <code>{@link ManualClientEndUEB}</code>.
40  *
41  * @generatedBy CodePro at 6/1/16 1:40 PM
42  * @version $Revision: 1.0 $
43  */
44 public class ManualClientEndUEBTest {
45         
46         String resultJson = "{'test':'testing'}";
47         String json = "{\"test\":\"testing\"}";
48         StdPDPNotification notification = new StdPDPNotification();
49         ManualClientEndUEB mockManualClient = null;
50         /**
51          * Perform pre-test initialization.
52          *
53          * @throws Exception
54          *         if the initialization fails for some reason
55          *
56          * @generatedBy CodePro at 6/1/16 1:40 PM
57          */
58         @Before
59         public void setUp()
60                 throws Exception {
61                 String url = "http://test.com";
62                 String uniqueID = "test";
63                 List<String> uebURLList = new LinkedList<String>();
64                 uebURLList.add(url);
65                                 
66         }
67         /**
68          * Run the ManualClientEndUEB() constructor test.
69          *
70          * @generatedBy CodePro at 6/1/16 1:40 PM
71          */
72         @Test
73         public void testManualClientEndUEB_1()
74                 throws Exception {
75                 ManualClientEndUEB result = new ManualClientEndUEB();
76                 assertNotNull(result);
77                 // add additional test code here
78         }
79
80         /**
81          * Run the void createTopic(String,String,List<String>) method test.
82          *
83          * @throws Exception
84          *
85          * @generatedBy CodePro at 6/1/16 1:40 PM
86          */
87         @Test
88         public void testCreateTopic_1()
89                 throws Exception {
90                 String url = "http://test.com";
91                 String uniqueID = "test";
92                 List<String> uebURLList = new LinkedList<String>();
93                 uebURLList.add(url);
94
95                 ManualClientEndUEB.createTopic(url, uniqueID, uebURLList);
96
97         }
98
99         /**
100          * Run the PDPNotification result(NotificationScheme) method test.
101          *
102          * @throws Exception
103          *
104          * @generatedBy CodePro at 6/1/16 1:40 PM
105          */
106         @Test
107         public void testResult_1()
108                 throws Exception {
109                 NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
110
111                 PDPNotification result = ManualClientEndUEB.result(scheme);
112
113                 assertNull(result);
114         }
115
116
117         /**
118          * Run the void start(String,List<String>,String) method test.
119          *
120          * @throws Exception
121          *
122          * @generatedBy CodePro at 6/1/16 1:40 PM
123          */
124         @Test
125         public void testStart_1()
126                 throws Exception {
127                 String url = "http://test.com";
128                 List<String> uebURLList = new LinkedList<String>();
129                 String uniqueID = "test";
130                 uebURLList.add(url);
131
132                 ManualClientEndUEB.start(url, uebURLList, uniqueID);
133
134                 // add additional test code here
135                 // An unexpected exception was thrown in user code while executing this test:
136                 //    java.lang.NoClassDefFoundError: Could not initialize class org.openecomp.policy.std.ManualClientEndUEB
137         }
138
139
140         /**
141          * Perform post-test clean-up.
142          *
143          * @throws Exception
144          *         if the clean-up fails for some reason
145          *
146          * @generatedBy CodePro at 6/1/16 1:40 PM
147          */
148         @After
149         public void tearDown()
150                 throws Exception {
151                 // Add additional tear down code here
152         }
153
154         /**
155          * Launch the test.
156          *
157          * @param args the command line arguments
158          *
159          * @generatedBy CodePro at 6/1/16 1:40 PM
160          */
161         public static void main(String[] args) {
162                 new org.junit.runner.JUnitCore().run(ManualClientEndUEBTest.class);
163         }
164 }