[POLICY-73] replace openecomp for policy-engine
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / onap / policy / test / DeletePolicyParametersTest.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.DeletePolicyCondition;
27 import org.onap.policy.api.DeletePolicyParameters;
28
29 import static org.junit.Assert.*;
30
31 /**
32  * The class <code>DeletePolicyParametersTest</code> contains tests for the class <code>{@link DeletePolicyParameters}</code>.
33  *
34  * @generatedBy CodePro at 6/1/16 1:40 PM
35  * @version $Revision: 1.0 $
36  */
37 public class DeletePolicyParametersTest {
38         /**
39          * Run the DeletePolicyCondition getDeleteCondition() method test.
40          *
41          * @throws Exception
42          *
43          * @generatedBy CodePro at 6/1/16 1:40 PM
44          */
45         @Test
46         public void testGetDeleteCondition_1()
47                 throws Exception {
48                 DeletePolicyParameters fixture = new DeletePolicyParameters();
49                 fixture.setPolicyComponent("");
50                 fixture.setPolicyName("");
51                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
52                 fixture.setRequestID(UUID.randomUUID());
53                 fixture.setPdpGroup("");
54
55                 DeletePolicyCondition result = fixture.getDeleteCondition();
56
57                 // add additional test code here
58                 assertNotNull(result);
59                 assertEquals("All Versions", result.toString());
60                 assertEquals("ALL", result.name());
61                 assertEquals(1, result.ordinal());
62         }
63
64         /**
65          * Run the String getPdpGroup() method test.
66          *
67          * @throws Exception
68          *
69          * @generatedBy CodePro at 6/1/16 1:40 PM
70          */
71         @Test
72         public void testGetPdpGroup_1()
73                 throws Exception {
74                 DeletePolicyParameters fixture = new DeletePolicyParameters();
75                 fixture.setPolicyComponent("");
76                 fixture.setPolicyName("");
77                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
78                 fixture.setRequestID(UUID.randomUUID());
79                 fixture.setPdpGroup("");
80
81                 String result = fixture.getPdpGroup();
82
83                 // add additional test code here
84                 assertEquals("", result);
85         }
86
87         /**
88          * Run the String getPolicyComponent() method test.
89          *
90          * @throws Exception
91          *
92          * @generatedBy CodePro at 6/1/16 1:40 PM
93          */
94         @Test
95         public void testGetPolicyComponent_1()
96                 throws Exception {
97                 DeletePolicyParameters fixture = new DeletePolicyParameters();
98                 fixture.setPolicyComponent("");
99                 fixture.setPolicyName("");
100                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
101                 fixture.setRequestID(UUID.randomUUID());
102                 fixture.setPdpGroup("");
103
104                 String result = fixture.getPolicyComponent();
105
106                 // add additional test code here
107                 assertEquals("", result);
108         }
109
110         /**
111          * Run the String getPolicyName() method test.
112          *
113          * @throws Exception
114          *
115          * @generatedBy CodePro at 6/1/16 1:40 PM
116          */
117         @Test
118         public void testGetPolicyName_1()
119                 throws Exception {
120                 DeletePolicyParameters fixture = new DeletePolicyParameters();
121                 fixture.setPolicyComponent("");
122                 fixture.setPolicyName("");
123                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
124                 fixture.setRequestID(UUID.randomUUID());
125                 fixture.setPdpGroup("");
126
127                 String result = fixture.getPolicyName();
128
129                 // add additional test code here
130                 assertEquals("", result);
131         }
132
133         /**
134          * Run the UUID getRequestID() method test.
135          *
136          * @throws Exception
137          *
138          * @generatedBy CodePro at 6/1/16 1:40 PM
139          */
140         @Test
141         public void testGetRequestID_1()
142                 throws Exception {
143                 DeletePolicyParameters fixture = new DeletePolicyParameters();
144                 fixture.setPolicyComponent("");
145                 fixture.setPolicyName("");
146                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
147                 fixture.setRequestID(UUID.fromString("482e90e2-2ad7-4265-9893-4cfe08ef1e3d"));
148                 fixture.setPdpGroup("");
149
150                 UUID result = fixture.getRequestID();
151
152                 // add additional test code here
153                 assertNotNull(result);
154                 assertEquals("482e90e2-2ad7-4265-9893-4cfe08ef1e3d", result.toString());
155                 assertEquals(4, result.version());
156                 assertEquals(2, result.variant());
157                 assertEquals(-7452528304412746179L, result.getLeastSignificantBits());
158                 assertEquals(5201253920715260517L, result.getMostSignificantBits());
159         }
160
161         /**
162          * Run the void setDeleteCondition(DeletePolicyCondition) method test.
163          *
164          * @throws Exception
165          *
166          * @generatedBy CodePro at 6/1/16 1:40 PM
167          */
168         @Test
169         public void testSetDeleteCondition_1()
170                 throws Exception {
171                 DeletePolicyParameters fixture = new DeletePolicyParameters();
172                 fixture.setPolicyComponent("");
173                 fixture.setPolicyName("");
174                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
175                 fixture.setRequestID(UUID.randomUUID());
176                 fixture.setPdpGroup("");
177                 DeletePolicyCondition deleteCondition = DeletePolicyCondition.ALL;
178
179                 fixture.setDeleteCondition(deleteCondition);
180
181                 // add additional test code here
182         }
183
184         /**
185          * Run the void setPdpGroup(String) method test.
186          *
187          * @throws Exception
188          *
189          * @generatedBy CodePro at 6/1/16 1:40 PM
190          */
191         @Test
192         public void testSetPdpGroup_1()
193                 throws Exception {
194                 DeletePolicyParameters fixture = new DeletePolicyParameters();
195                 fixture.setPolicyComponent("");
196                 fixture.setPolicyName("");
197                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
198                 fixture.setRequestID(UUID.randomUUID());
199                 fixture.setPdpGroup("");
200                 String pdpGroup = "";
201
202                 fixture.setPdpGroup(pdpGroup);
203
204                 // add additional test code here
205         }
206
207         /**
208          * Run the void setPolicyComponent(String) method test.
209          *
210          * @throws Exception
211          *
212          * @generatedBy CodePro at 6/1/16 1:40 PM
213          */
214         @Test
215         public void testSetPolicyComponent_1()
216                 throws Exception {
217                 DeletePolicyParameters fixture = new DeletePolicyParameters();
218                 fixture.setPolicyComponent("");
219                 fixture.setPolicyName("");
220                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
221                 fixture.setRequestID(UUID.randomUUID());
222                 fixture.setPdpGroup("");
223                 String policyComponent = "";
224
225                 fixture.setPolicyComponent(policyComponent);
226
227                 // add additional test code here
228         }
229
230         /**
231          * Run the void setPolicyName(String) method test.
232          *
233          * @throws Exception
234          *
235          * @generatedBy CodePro at 6/1/16 1:40 PM
236          */
237         @Test
238         public void testSetPolicyName_1()
239                 throws Exception {
240                 DeletePolicyParameters fixture = new DeletePolicyParameters();
241                 fixture.setPolicyComponent("");
242                 fixture.setPolicyName("");
243                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
244                 fixture.setRequestID(UUID.randomUUID());
245                 fixture.setPdpGroup("");
246                 String policyName = "";
247
248                 fixture.setPolicyName(policyName);
249
250                 // add additional test code here
251         }
252
253         /**
254          * Run the void setRequestID(UUID) method test.
255          *
256          * @throws Exception
257          *
258          * @generatedBy CodePro at 6/1/16 1:40 PM
259          */
260         @Test
261         public void testSetRequestID_1()
262                 throws Exception {
263                 DeletePolicyParameters fixture = new DeletePolicyParameters();
264                 fixture.setPolicyComponent("");
265                 fixture.setPolicyName("");
266                 fixture.setDeleteCondition(DeletePolicyCondition.ALL);
267                 fixture.setRequestID(UUID.randomUUID());
268                 fixture.setPdpGroup("");
269                 UUID requestID = UUID.randomUUID();
270
271                 fixture.setRequestID(requestID);
272
273                 // add additional test code here
274         }
275
276         /**
277          * Perform pre-test initialization.
278          *
279          * @throws Exception
280          *         if the initialization fails for some reason
281          *
282          * @generatedBy CodePro at 6/1/16 1:40 PM
283          */
284         @Before
285         public void setUp()
286                 throws Exception {
287                 // add additional set up code here
288         }
289
290         /**
291          * Perform post-test clean-up.
292          *
293          * @throws Exception
294          *         if the clean-up fails for some reason
295          *
296          * @generatedBy CodePro at 6/1/16 1:40 PM
297          */
298         @After
299         public void tearDown()
300                 throws Exception {
301                 // Add additional tear down code here
302         }
303
304         /**
305          * Launch the test.
306          *
307          * @param args the command line arguments
308          *
309          * @generatedBy CodePro at 6/1/16 1:40 PM
310          */
311         public static void main(String[] args) {
312                 new org.junit.runner.JUnitCore().run(DeletePolicyParametersTest.class);
313         }
314 }