be3e9c39bd420534aecbd1117c92aba977b362ac
[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  * 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 static org.junit.Assert.assertEquals;
24 import static org.junit.Assert.assertNotNull;
25
26 import java.util.UUID;
27
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 <code>{@link ImportParameters}</code>.
35  *
36  * @generatedBy CodePro at 6/1/16 1:40 PM
37  * @version $Revision: 1.0 $
38  */
39 public class ImportParametersTest {
40         /**
41          * Run the String getDescription() method test.
42          *
43          * @throws Exception
44          *
45          * @generatedBy CodePro at 6/1/16 1:40 PM
46          */
47         @Test
48         public void testGetDescription_1()
49                 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()
73                 throws Exception {
74                 ImportParameters fixture = new ImportParameters();
75                 fixture.setFilePath("");
76                 fixture.setVersion("");
77                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
78                 fixture.setRequestID(UUID.randomUUID());
79                 fixture.setDescription("");
80                 fixture.setServiceName("");
81
82                 String result = fixture.getFilePath();
83
84                 // add additional test code here
85                 assertEquals("", result);
86         }
87
88         /**
89          * Run the UUID getRequestID() method test.
90          *
91          * @throws Exception
92          *
93          * @generatedBy CodePro at 6/1/16 1:40 PM
94          */
95         @Test
96         public void testGetRequestID_1()
97                 throws Exception {
98                 ImportParameters fixture = new ImportParameters();
99                 fixture.setFilePath("");
100                 fixture.setVersion("");
101                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
102                 fixture.setRequestID(UUID.fromString("731dca0a-fe99-456c-8ad2-87cff8437b2f"));
103                 fixture.setDescription("");
104                 fixture.setServiceName("");
105
106                 UUID result = fixture.getRequestID();
107
108                 // add additional test code here
109                 assertNotNull(result);
110                 assertEquals("731dca0a-fe99-456c-8ad2-87cff8437b2f", result.toString());
111                 assertEquals(4, result.version());
112                 assertEquals(2, result.variant());
113                 assertEquals(-8443537024073106641L, result.getLeastSignificantBits());
114                 assertEquals(8295008237256263020L, result.getMostSignificantBits());
115         }
116
117         /**
118          * Run the String getServiceName() method test.
119          *
120          * @throws Exception
121          *
122          * @generatedBy CodePro at 6/1/16 1:40 PM
123          */
124         @Test
125         public void testGetServiceName_1()
126                 throws Exception {
127                 ImportParameters fixture = new ImportParameters();
128                 fixture.setFilePath("");
129                 fixture.setVersion("");
130                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
131                 fixture.setRequestID(UUID.randomUUID());
132                 fixture.setDescription("");
133                 fixture.setServiceName("");
134
135                 String result = fixture.getServiceName();
136
137                 // add additional test code here
138                 assertEquals("", result);
139         }
140
141         /**
142          * Run the ImportParameters.IMPORT_TYPE getServiceType() method test.
143          *
144          * @throws Exception
145          *
146          * @generatedBy CodePro at 6/1/16 1:40 PM
147          */
148         @Test
149         public void testGetServiceType_1()
150                 throws Exception {
151                 ImportParameters fixture = new ImportParameters();
152                 fixture.setFilePath("");
153                 fixture.setVersion("");
154                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
155                 fixture.setRequestID(UUID.randomUUID());
156                 fixture.setDescription("");
157                 fixture.setServiceName("");
158
159                 ImportParameters.IMPORT_TYPE result = fixture.getServiceType();
160
161                 // add additional test code here
162                 assertNotNull(result);
163                 assertEquals("MICROSERVICE", result.name());
164                 assertEquals("MICROSERVICE", result.toString());
165                 assertEquals(0, result.ordinal());
166         }
167
168         /**
169          * Run the String getVersion() method test.
170          *
171          * @throws Exception
172          *
173          * @generatedBy CodePro at 6/1/16 1:40 PM
174          */
175         @Test
176         public void testGetVersion_1()
177                 throws Exception {
178                 ImportParameters fixture = new ImportParameters();
179                 fixture.setFilePath("");
180                 fixture.setVersion("");
181                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
182                 fixture.setRequestID(UUID.randomUUID());
183                 fixture.setDescription("");
184                 fixture.setServiceName("");
185
186                 String result = fixture.getVersion();
187
188                 // add additional test code here
189                 assertEquals("", result);
190         }
191
192         /**
193          * Run the void setDescription(String) method test.
194          *
195          * @throws Exception
196          *
197          * @generatedBy CodePro at 6/1/16 1:40 PM
198          */
199         @Test
200         public void testSetDescription_1()
201                 throws Exception {
202                 ImportParameters fixture = new ImportParameters();
203                 fixture.setFilePath("");
204                 fixture.setVersion("");
205                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
206                 fixture.setRequestID(UUID.randomUUID());
207                 fixture.setDescription("");
208                 fixture.setServiceName("");
209                 String description = "";
210
211                 fixture.setDescription(description);
212
213                 // add additional test code here
214         }
215
216         /**
217          * Run the void setFilePath(String) method test.
218          *
219          * @throws Exception
220          *
221          * @generatedBy CodePro at 6/1/16 1:40 PM
222          */
223         @Test
224         public void testSetFilePath_1()
225                 throws Exception {
226                 ImportParameters fixture = new ImportParameters();
227                 fixture.setFilePath("");
228                 fixture.setVersion("");
229                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
230                 fixture.setRequestID(UUID.randomUUID());
231                 fixture.setDescription("");
232                 fixture.setServiceName("");
233                 String filePath = "";
234
235                 fixture.setFilePath(filePath);
236
237                 // add additional test code here
238         }
239
240         /**
241          * Run the void setImportParameters(String,String,UUID,String,IMPORT_TYPE,String) method test.
242          *
243          * @throws Exception
244          *
245          * @generatedBy CodePro at 6/1/16 1:40 PM
246          */
247         @Test
248         public void testSetImportParameters_1()
249                 throws Exception {
250                 ImportParameters fixture = new ImportParameters();
251                 fixture.setFilePath("");
252                 fixture.setVersion("");
253                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
254                 fixture.setRequestID(UUID.randomUUID());
255                 fixture.setDescription("");
256                 fixture.setServiceName("");
257                 String serviceName = "";
258                 String description = "";
259                 UUID requestID = UUID.randomUUID();
260                 String filePath = "";
261                 ImportParameters.IMPORT_TYPE importType = ImportParameters.IMPORT_TYPE.MICROSERVICE;
262                 String version = "";
263
264                 fixture.setImportParameters(serviceName, description, requestID, filePath, importType, version);
265
266                 // add additional test code here
267         }
268
269         /**
270          * Run the void setRequestID(UUID) method test.
271          *
272          * @throws Exception
273          *
274          * @generatedBy CodePro at 6/1/16 1:40 PM
275          */
276         @Test
277         public void testSetRequestID_1()
278                 throws Exception {
279                 ImportParameters fixture = new ImportParameters();
280                 fixture.setFilePath("");
281                 fixture.setVersion("");
282                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
283                 fixture.setRequestID(UUID.randomUUID());
284                 fixture.setDescription("");
285                 fixture.setServiceName("");
286                 UUID requestID = UUID.randomUUID();
287
288                 fixture.setRequestID(requestID);
289
290                 // add additional test code here
291         }
292
293         /**
294          * Run the void setServiceName(String) method test.
295          *
296          * @throws Exception
297          *
298          * @generatedBy CodePro at 6/1/16 1:40 PM
299          */
300         @Test
301         public void testSetServiceName_1()
302                 throws Exception {
303                 ImportParameters fixture = new ImportParameters();
304                 fixture.setFilePath("");
305                 fixture.setVersion("");
306                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
307                 fixture.setRequestID(UUID.randomUUID());
308                 fixture.setDescription("");
309                 fixture.setServiceName("");
310                 String serviceName = "";
311
312                 fixture.setServiceName(serviceName);
313
314                 // add additional test code here
315         }
316
317         /**
318          * Run the void setServiceType(IMPORT_TYPE) method test.
319          *
320          * @throws Exception
321          *
322          * @generatedBy CodePro at 6/1/16 1:40 PM
323          */
324         @Test
325         public void testSetServiceType_1()
326                 throws Exception {
327                 ImportParameters fixture = new ImportParameters();
328                 fixture.setFilePath("");
329                 fixture.setVersion("");
330                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
331                 fixture.setRequestID(UUID.randomUUID());
332                 fixture.setDescription("");
333                 fixture.setServiceName("");
334                 ImportParameters.IMPORT_TYPE enumImportType = ImportParameters.IMPORT_TYPE.MICROSERVICE;
335
336                 fixture.setServiceType(enumImportType);
337
338                 // add additional test code here
339         }
340
341         /**
342          * Run the void setVersion(String) method test.
343          *
344          * @throws Exception
345          *
346          * @generatedBy CodePro at 6/1/16 1:40 PM
347          */
348         @Test
349         public void testSetVersion_1()
350                 throws Exception {
351                 ImportParameters fixture = new ImportParameters();
352                 fixture.setFilePath("");
353                 fixture.setVersion("");
354                 fixture.setServiceType(ImportParameters.IMPORT_TYPE.MICROSERVICE);
355                 fixture.setRequestID(UUID.randomUUID());
356                 fixture.setDescription("");
357                 fixture.setServiceName("");
358                 String version = "";
359
360                 fixture.setVersion(version);
361
362                 // add additional test code here
363         }
364
365         /**
366          * Perform pre-test initialization.
367          *
368          * @throws Exception
369          *         if the initialization fails for some reason
370          *
371          * @generatedBy CodePro at 6/1/16 1:40 PM
372          */
373         @Before
374         public void setUp()
375                 throws Exception {
376                 // add additional set up code here
377         }
378
379         /**
380          * Perform post-test clean-up.
381          *
382          * @throws Exception
383          *         if the clean-up fails for some reason
384          *
385          * @generatedBy CodePro at 6/1/16 1:40 PM
386          */
387         @After
388         public void tearDown()
389                 throws Exception {
390                 // Add additional tear down code here
391         }
392
393         /**
394          * Launch the test.
395          *
396          * @param args the command line arguments
397          *
398          * @generatedBy CodePro at 6/1/16 1:40 PM
399          */
400         public static void main(String[] args) {
401                 new org.junit.runner.JUnitCore().run(ImportParametersTest.class);
402         }
403 }