8325897572eda5361a4c020cdd9f6681033a3149
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / onap / policy / test / PushPolicyParametersTest.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.onap.policy.test;
22
23 import java.util.UUID;
24
25 import org.junit.*;
26 import org.onap.policy.api.PushPolicyParameters;
27
28 import static org.junit.Assert.*;
29
30 /**
31  * The class <code>PushPolicyParametersTest</code> contains tests for the class <code>{@link PushPolicyParameters}</code>.
32  *
33  * @generatedBy CodePro at 6/1/16 1:40 PM
34  * @version $Revision: 1.0 $
35  */
36 public class PushPolicyParametersTest {
37         /**
38          * Run the PushPolicyParameters() constructor test.
39          *
40          * @throws Exception
41          *
42          * @generatedBy CodePro at 6/1/16 1:40 PM
43          */
44         @Test
45         public void testPushPolicyParameters_1()
46                 throws Exception {
47
48                 PushPolicyParameters result = new PushPolicyParameters();
49
50                 // add additional test code here
51                 assertNotNull(result);
52                 assertEquals(null, result.getPolicyName());
53                 assertEquals(null, result.getRequestID());
54                 assertEquals(null, result.getPolicyType());
55                 assertEquals(null, result.getPdpGroup());
56         }
57
58         /**
59          * Run the PushPolicyParameters(String,String,String,UUID) constructor test.
60          *
61          * @throws Exception
62          *
63          * @generatedBy CodePro at 6/1/16 1:40 PM
64          */
65         @Test
66         public void testPushPolicyParameters_2()
67                 throws Exception {
68                 String policyName = "";
69                 String policyType = "";
70                 String pdpGroup = "";
71                 UUID requestID = UUID.randomUUID();
72
73                 PushPolicyParameters result = new PushPolicyParameters(policyName, policyType, pdpGroup, requestID);
74
75                 // add additional test code here
76                 assertNotNull(result);
77                 assertEquals("", result.getPolicyName());
78                 assertEquals("", result.getPolicyType());
79                 assertEquals("", result.getPdpGroup());
80         }
81
82         /**
83          * Run the String getPdpGroup() method test.
84          *
85          * @throws Exception
86          *
87          * @generatedBy CodePro at 6/1/16 1:40 PM
88          */
89         @Test
90         public void testGetPdpGroup_1()
91                 throws Exception {
92                 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
93
94                 String result = fixture.getPdpGroup();
95
96                 // add additional test code here
97                 assertEquals("", result);
98         }
99
100         /**
101          * Run the String getPolicyName() method test.
102          *
103          * @throws Exception
104          *
105          * @generatedBy CodePro at 6/1/16 1:40 PM
106          */
107         @Test
108         public void testGetPolicyName_1()
109                 throws Exception {
110                 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
111
112                 String result = fixture.getPolicyName();
113
114                 // add additional test code here
115                 assertEquals("", result);
116         }
117
118         /**
119          * Run the String getPolicyType() method test.
120          *
121          * @throws Exception
122          *
123          * @generatedBy CodePro at 6/1/16 1:40 PM
124          */
125         @Test
126         public void testGetPolicyType_1()
127                 throws Exception {
128                 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
129
130                 String result = fixture.getPolicyType();
131
132                 // add additional test code here
133                 assertEquals("", result);
134         }
135
136         /**
137          * Run the UUID getRequestID() method test.
138          *
139          * @throws Exception
140          *
141          * @generatedBy CodePro at 6/1/16 1:40 PM
142          */
143         @Test
144         public void testGetRequestID()
145                 throws Exception {
146                 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.fromString("d1dbaac1-0944-4f07-9ce7-733c697537ea"));
147
148                 UUID result = fixture.getRequestID();
149
150                 // add additional test code here
151                 assertNotNull(result);
152                 assertEquals("d1dbaac1-0944-4f07-9ce7-733c697537ea", result.toString());
153                 assertEquals(4, result.version());
154                 assertEquals(2, result.variant());
155                 assertEquals(-7140611980868110358L, result.getLeastSignificantBits());
156                 assertEquals(-3324876153822097657L, result.getMostSignificantBits());
157         }
158
159         /**
160          * Run the void setPdpGroup(String) method test.
161          *
162          * @throws Exception
163          *
164          * @generatedBy CodePro at 6/1/16 1:40 PM
165          */
166         @Test
167         public void testSetPdpGroup_1()
168                 throws Exception {
169                 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
170                 String pdpGroup = "";
171
172                 fixture.setPdpGroup(pdpGroup);
173
174                 // add additional test code here
175         }
176
177         /**
178          * Run the void setPolicyName(String) method test.
179          *
180          * @throws Exception
181          *
182          * @generatedBy CodePro at 6/1/16 1:40 PM
183          */
184         @Test
185         public void testSetPolicyName_1()
186                 throws Exception {
187                 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
188                 String policyName = "";
189
190                 fixture.setPolicyName(policyName);
191
192                 // add additional test code here
193         }
194
195         /**
196          * Run the void setPolicyType(String) method test.
197          *
198          * @throws Exception
199          *
200          * @generatedBy CodePro at 6/1/16 1:40 PM
201          */
202         @Test
203         public void testSetPolicyType_1()
204                 throws Exception {
205                 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
206                 String policyType = "";
207
208                 fixture.setPolicyType(policyType);
209
210                 // add additional test code here
211         }
212
213         /**
214          * Run the void setRequestID(UUID) method test.
215          *
216          * @throws Exception
217          *
218          * @generatedBy CodePro at 6/1/16 1:40 PM
219          */
220         @Test
221         public void testSetRequestID_1()
222                 throws Exception {
223                 PushPolicyParameters fixture = new PushPolicyParameters("", "", "", UUID.randomUUID());
224                 UUID requestID = UUID.randomUUID();
225
226                 fixture.setRequestID(requestID);
227
228                 // add additional test code here
229         }
230
231         /**
232          * Perform pre-test initialization.
233          *
234          * @throws Exception
235          *         if the initialization fails for some reason
236          *
237          * @generatedBy CodePro at 6/1/16 1:40 PM
238          */
239         @Before
240         public void setUp()
241                 throws Exception {
242                 // add additional set up code here
243         }
244
245         /**
246          * Perform post-test clean-up.
247          *
248          * @throws Exception
249          *         if the clean-up fails for some reason
250          *
251          * @generatedBy CodePro at 6/1/16 1:40 PM
252          */
253         @After
254         public void tearDown()
255                 throws Exception {
256                 // Add additional tear down code here
257         }
258
259         /**
260          * Launch the test.
261          *
262          * @param args the command line arguments
263          *
264          * @generatedBy CodePro at 6/1/16 1:40 PM
265          */
266         public static void main(String[] args) {
267                 new org.junit.runner.JUnitCore().run(PushPolicyParametersTest.class);
268         }
269 }