Reformat PolicyEngineAPI test cases
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / onap / policy / test / ImportParametersTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * PolicyEngineAPI
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Modifications Copyright (C) 2019 Samsung
8  * ================================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.policy.test;
24
25 import static org.junit.Assert.assertEquals;
26 import static org.junit.Assert.assertNotNull;
27 import java.util.UUID;
28 import org.junit.After;
29 import org.junit.Before;
30 import org.junit.Test;
31 import org.onap.policy.api.ImportParameters;
32
33 /**
34  * The class <code>ImportParametersTest</code> contains tests for the class
35  * <code>{@link ImportParameters}</code>.
36  *
37  * @generatedBy CodePro at 6/1/16 1:40 PM
38  * @version $Revision: 1.0 $
39  */
40 public class ImportParametersTest {
41     /**
42      * Run the String getDescription() method test.
43      *
44      * @throws Exception
45      *
46      * @generatedBy CodePro at 6/1/16 1:40 PM
47      */
48     @Test
49     public void testGetDescription_1() throws Exception {
50         ImportParameters fixture = new ImportParameters();
51         fixture.setFilePath("");
52         fixture.setVersion("");
53         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
54         fixture.setRequestID(UUID.randomUUID());
55         fixture.setDescription("");
56         fixture.setServiceName("");
57
58         String result = fixture.getDescription();
59
60         // add additional test code here
61         assertEquals("", result);
62     }
63
64     /**
65      * Run the String getFilePath() method test.
66      *
67      * @throws Exception
68      *
69      * @generatedBy CodePro at 6/1/16 1:40 PM
70      */
71     @Test
72     public void testGetFilePath_1() throws Exception {
73         ImportParameters fixture = new ImportParameters();
74         fixture.setFilePath("");
75         fixture.setVersion("");
76         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
77         fixture.setRequestID(UUID.randomUUID());
78         fixture.setDescription("");
79         fixture.setServiceName("");
80
81         String result = fixture.getFilePath();
82
83         // add additional test code here
84         assertEquals("", result);
85     }
86
87     /**
88      * Run the UUID getRequestID() method test.
89      *
90      * @throws Exception
91      *
92      * @generatedBy CodePro at 6/1/16 1:40 PM
93      */
94     @Test
95     public void testGetRequestID_1() throws Exception {
96         ImportParameters fixture = new ImportParameters();
97         fixture.setFilePath("");
98         fixture.setVersion("");
99         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
100         fixture.setRequestID(UUID.fromString("731dca0a-fe99-456c-8ad2-87cff8437b2f"));
101         fixture.setDescription("");
102         fixture.setServiceName("");
103
104         UUID result = fixture.getRequestID();
105
106         // add additional test code here
107         assertNotNull(result);
108         assertEquals("731dca0a-fe99-456c-8ad2-87cff8437b2f", result.toString());
109         assertEquals(4, result.version());
110         assertEquals(2, result.variant());
111         assertEquals(-8443537024073106641L, result.getLeastSignificantBits());
112         assertEquals(8295008237256263020L, result.getMostSignificantBits());
113     }
114
115     /**
116      * Run the String getServiceName() method test.
117      *
118      * @throws Exception
119      *
120      * @generatedBy CodePro at 6/1/16 1:40 PM
121      */
122     @Test
123     public void testGetServiceName_1() throws Exception {
124         ImportParameters fixture = new ImportParameters();
125         fixture.setFilePath("");
126         fixture.setVersion("");
127         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
128         fixture.setRequestID(UUID.randomUUID());
129         fixture.setDescription("");
130         fixture.setServiceName("");
131
132         String result = fixture.getServiceName();
133
134         // add additional test code here
135         assertEquals("", result);
136     }
137
138     /**
139      * Run the ImportParameters.IMPORT_TYPE getServiceType() method test.
140      *
141      * @throws Exception
142      *
143      * @generatedBy CodePro at 6/1/16 1:40 PM
144      */
145     @Test
146     public void testGetServiceType_1() throws Exception {
147         ImportParameters fixture = new ImportParameters();
148         fixture.setFilePath("");
149         fixture.setVersion("");
150         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
151         fixture.setRequestID(UUID.randomUUID());
152         fixture.setDescription("");
153         fixture.setServiceName("");
154
155         ImportParameters.IMPORT_TYPE result = fixture.getServiceType();
156
157         // add additional test code here
158         assertNotNull(result);
159         assertEquals("MICROSERVICE", result.name());
160         assertEquals("MICROSERVICE", result.toString());
161         assertEquals(0, result.ordinal());
162     }
163
164     /**
165      * Run the String getVersion() method test.
166      *
167      * @throws Exception
168      *
169      * @generatedBy CodePro at 6/1/16 1:40 PM
170      */
171     @Test
172     public void testGetVersion_1() throws Exception {
173         ImportParameters fixture = new ImportParameters();
174         fixture.setFilePath("");
175         fixture.setVersion("");
176         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
177         fixture.setRequestID(UUID.randomUUID());
178         fixture.setDescription("");
179         fixture.setServiceName("");
180
181         String result = fixture.getVersion();
182
183         // add additional test code here
184         assertEquals("", result);
185     }
186
187     /**
188      * Run the void setDescription(String) method test.
189      *
190      * @throws Exception
191      *
192      * @generatedBy CodePro at 6/1/16 1:40 PM
193      */
194     @Test
195     public void testSetDescription_1() throws Exception {
196         ImportParameters fixture = new ImportParameters();
197         fixture.setFilePath("");
198         fixture.setVersion("");
199         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
200         fixture.setRequestID(UUID.randomUUID());
201         fixture.setDescription("");
202         fixture.setServiceName("");
203         String description = "";
204
205         fixture.setDescription(description);
206
207         // add additional test code here
208     }
209
210     /**
211      * Run the void setFilePath(String) method test.
212      *
213      * @throws Exception
214      *
215      * @generatedBy CodePro at 6/1/16 1:40 PM
216      */
217     @Test
218     public void testSetFilePath_1() throws Exception {
219         ImportParameters fixture = new ImportParameters();
220         fixture.setFilePath("");
221         fixture.setVersion("");
222         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
223         fixture.setRequestID(UUID.randomUUID());
224         fixture.setDescription("");
225         fixture.setServiceName("");
226         String filePath = "";
227
228         fixture.setFilePath(filePath);
229
230         // add additional test code here
231     }
232
233     /**
234      * Run the void setImportParameters(String,String,UUID,String,IMPORT_TYPE,String) method test.
235      *
236      * @throws Exception
237      *
238      * @generatedBy CodePro at 6/1/16 1:40 PM
239      */
240     @Test
241     public void testSetImportParameters_1() throws Exception {
242         ImportParameters fixture = new ImportParameters();
243         fixture.setFilePath("");
244         fixture.setVersion("");
245         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
246         fixture.setRequestID(UUID.randomUUID());
247         fixture.setDescription("");
248         fixture.setServiceName("");
249         String serviceName = "";
250         String description = "";
251         UUID requestID = UUID.randomUUID();
252         String filePath = "";
253         ImportParameters.IMPORT_TYPE importType = ImportParameters.IMPORT_TYPE.MICROSERVICE;
254         String version = "";
255
256         fixture.setImportParameters(serviceName, description, requestID, filePath, importType,
257                 version);
258
259         // add additional test code here
260     }
261
262     /**
263      * Run the void setRequestID(UUID) method test.
264      *
265      * @throws Exception
266      *
267      * @generatedBy CodePro at 6/1/16 1:40 PM
268      */
269     @Test
270     public void testSetRequestID_1() throws Exception {
271         ImportParameters fixture = new ImportParameters();
272         fixture.setFilePath("");
273         fixture.setVersion("");
274         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
275         fixture.setRequestID(UUID.randomUUID());
276         fixture.setDescription("");
277         fixture.setServiceName("");
278         UUID requestID = UUID.randomUUID();
279
280         fixture.setRequestID(requestID);
281
282         // add additional test code here
283     }
284
285     /**
286      * Run the void setServiceName(String) method test.
287      *
288      * @throws Exception
289      *
290      * @generatedBy CodePro at 6/1/16 1:40 PM
291      */
292     @Test
293     public void testSetServiceName_1() throws Exception {
294         ImportParameters fixture = new ImportParameters();
295         fixture.setFilePath("");
296         fixture.setVersion("");
297         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
298         fixture.setRequestID(UUID.randomUUID());
299         fixture.setDescription("");
300         fixture.setServiceName("");
301         String serviceName = "";
302
303         fixture.setServiceName(serviceName);
304
305         // add additional test code here
306     }
307
308     /**
309      * Run the void setServiceType(IMPORT_TYPE) method test.
310      *
311      * @throws Exception
312      *
313      * @generatedBy CodePro at 6/1/16 1:40 PM
314      */
315     @Test
316     public void testSetServiceType_1() throws Exception {
317         ImportParameters fixture = new ImportParameters();
318         fixture.setFilePath("");
319         fixture.setVersion("");
320         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
321         fixture.setRequestID(UUID.randomUUID());
322         fixture.setDescription("");
323         fixture.setServiceName("");
324         ImportParameters.IMPORT_TYPE enumImportType = ImportParameters.IMPORT_TYPE.MICROSERVICE;
325
326         fixture.setServiceType(enumImportType);
327
328         // add additional test code here
329     }
330
331     /**
332      * Run the void setVersion(String) method test.
333      *
334      * @throws Exception
335      *
336      * @generatedBy CodePro at 6/1/16 1:40 PM
337      */
338     @Test
339     public void testSetVersion_1() throws Exception {
340         ImportParameters fixture = new ImportParameters();
341         fixture.setFilePath("");
342         fixture.setVersion("");
343         fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
344         fixture.setRequestID(UUID.randomUUID());
345         fixture.setDescription("");
346         fixture.setServiceName("");
347         String version = "";
348
349         fixture.setVersion(version);
350
351         // add additional test code here
352     }
353
354     /**
355      * Perform pre-test initialization.
356      *
357      * @throws Exception if the initialization fails for some reason
358      *
359      * @generatedBy CodePro at 6/1/16 1:40 PM
360      */
361     @Before
362     public void setUp() throws Exception {
363         // add additional set up code here
364     }
365
366     /**
367      * Perform post-test clean-up.
368      *
369      * @throws Exception if the clean-up fails for some reason
370      *
371      * @generatedBy CodePro at 6/1/16 1:40 PM
372      */
373     @After
374     public void tearDown() throws Exception {
375         // Add additional tear down code here
376     }
377
378     /**
379      * Launch the test.
380      *
381      * @param args the command line arguments
382      *
383      * @generatedBy CodePro at 6/1/16 1:40 PM
384      */
385     public static void main(String[] args) {
386         new org.junit.runner.JUnitCore().run(ImportParametersTest.class);
387     }
388 }