add few more tests to BE components
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / components / impl / ProductBusinessLogicTest.java
1 package org.openecomp.sdc.be.components.impl;
2
3 import java.util.List;
4 import java.util.Map;
5
6 import javax.annotation.Generated;
7
8 import org.apache.commons.math3.stat.descriptive.summary.Product;
9 import org.junit.Assert;
10 import org.junit.Test;
11 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
12 import org.openecomp.sdc.be.model.Component;
13 import org.openecomp.sdc.be.model.ComponentInstance;
14 import org.openecomp.sdc.be.model.User;
15 import org.openecomp.sdc.be.model.operations.api.ICacheMangerOperation;
16 import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
17 import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
18 import org.openecomp.sdc.exception.ResponseFormat;
19
20 import fj.data.Either;
21
22
23 public class ProductBusinessLogicTest {
24
25         private ProductBusinessLogic createTestSubject() {
26                 return new ProductBusinessLogic();
27         }
28
29         @Test
30         public void testValidateProductNameExists() throws Exception {
31                 ProductBusinessLogic testSubject;
32                 String productName = "";
33                 String userId = "";
34                 Either<Map<String, Boolean>, ResponseFormat> result;
35
36                 // default test
37                 testSubject = createTestSubject();
38         }
39
40         @Test
41         public void testSetDeploymentArtifactsPlaceHolder() throws Exception {
42                 ProductBusinessLogic testSubject;
43                 Component component = null;
44                 User user = null;
45
46                 // default test
47                 testSubject = createTestSubject();
48                 testSubject.setDeploymentArtifactsPlaceHolder(component, user);
49         }
50
51         @Test
52         public void testDeleteMarkedComponents() throws Exception {
53                 ProductBusinessLogic testSubject;
54                 Either<List<String>, ResponseFormat> result;
55
56                 // default test
57                 testSubject = createTestSubject();
58                 
59         }
60
61         @Test
62         public void testGetComponentInstanceBL() throws Exception {
63                 ProductBusinessLogic testSubject;
64                 ComponentInstanceBusinessLogic result;
65
66                 // default test
67                 testSubject = createTestSubject();
68                 
69         }
70
71         @Test
72         public void testGetComponentInstancesFilteredByPropertiesAndInputs() throws Exception {
73                 ProductBusinessLogic testSubject;
74                 String componentId = "";
75                 ComponentTypeEnum componentTypeEnum = null;
76                 String userId = "";
77                 String searchText = "";
78                 Either<List<ComponentInstance>, ResponseFormat> result;
79
80                 // default test
81                 testSubject = createTestSubject();
82                 
83         }
84
85         @Test
86         public void testGetCacheManagerOperation() throws Exception {
87                 ProductBusinessLogic testSubject;
88                 ICacheMangerOperation result;
89
90                 // default test
91                 testSubject = createTestSubject();
92                 
93         }
94
95         @Test
96         public void testSetCacheManagerOperation() throws Exception {
97                 ProductBusinessLogic testSubject;
98                 ICacheMangerOperation cacheManagerOperation = null;
99
100                 // default test
101                 testSubject = createTestSubject();
102                 testSubject.setCacheManagerOperation(cacheManagerOperation);
103         }
104
105         @Test
106         public void testGetUiComponentDataTransferByComponentId() throws Exception {
107                 ProductBusinessLogic testSubject;
108                 String componentId = "";
109                 List<String> dataParamsToReturn = null;
110                 Either<UiComponentDataTransfer, ResponseFormat> result;
111
112                 // default test
113                 testSubject = createTestSubject();
114                 
115         }
116
117         
118         @Test
119         public void testCreateProduct() throws Exception {
120                 ProductBusinessLogic testSubject;
121                 Product product = null;
122                 User user = null;
123                 Either<Product, ResponseFormat> result;
124
125                 // test 1
126                 testSubject = createTestSubject();
127                 product = null;
128                 
129         }
130
131         
132         @Test
133         public void testCheckUnupdatableProductFields() throws Exception {
134                 ProductBusinessLogic testSubject;
135                 Product product = null;
136
137                 // default test
138                 testSubject = createTestSubject();
139         }
140
141         
142         @Test
143         public void testValidateProductBeforeCreate() throws Exception {
144                 ProductBusinessLogic testSubject;
145                 Product product = null;
146                 User user = null;
147                 AuditingActionEnum actionEnum = null;
148                 Either<Product, ResponseFormat> result;
149
150                 // default test
151                 testSubject = createTestSubject();
152                 
153         }
154
155         
156         @Test
157         public void testValidateProductFieldsBeforeCreate() throws Exception {
158                 ProductBusinessLogic testSubject;
159                 User user = null;
160                 Product product = null;
161                 AuditingActionEnum actionEnum = null;
162                 Either<Boolean, ResponseFormat> result;
163
164                 // default test
165                 testSubject = createTestSubject();
166                 
167         }
168
169         
170         @Test
171         public void testValidateAndUpdateProductContactsList() throws Exception {
172                 ProductBusinessLogic testSubject;
173                 User user = null;
174                 Product product = null;
175                 AuditingActionEnum actionEnum = null;
176                 Either<Boolean, ResponseFormat> result;
177
178                 // default test
179                 testSubject = createTestSubject();
180                 
181         }
182
183         
184         @Test
185         public void testValidateGrouping() throws Exception {
186                 ProductBusinessLogic testSubject;
187                 User user = null;
188                 Product product = null;
189                 AuditingActionEnum actionEnum = null;
190                 Either<Boolean, ResponseFormat> result;
191
192                 // default test
193                 testSubject = createTestSubject();
194                 
195         }
196
197         
198         @Test
199         public void testGetProduct() throws Exception {
200                 ProductBusinessLogic testSubject;
201                 String productId = "";
202                 User user = null;
203                 Either<Product, ResponseFormat> result;
204
205                 // default test
206                 testSubject = createTestSubject();
207                 
208         }
209
210         
211         @Test
212         public void testDeleteProduct() throws Exception {
213                 ProductBusinessLogic testSubject;
214                 String productId = "";
215                 User user = null;
216                 Either<Product, ResponseFormat> result;
217
218                 // default test
219                 testSubject = createTestSubject();
220                 
221         }
222
223         
224         @Test
225         public void testValidateProductFullNameAndCleanup() throws Exception {
226                 ProductBusinessLogic testSubject;
227                 User user = null;
228                 Product product = null;
229                 AuditingActionEnum actionEnum = null;
230                 Either<Boolean, ResponseFormat> result;
231
232                 // default test
233                 testSubject = createTestSubject();
234                 
235         }
236
237         
238         @Test
239         public void testValidateProductNameAndCleanup() throws Exception {
240                 ProductBusinessLogic testSubject;
241                 User user = null;
242                 Product product = null;
243                 AuditingActionEnum actionEnum = null;
244                 Either<Boolean, ResponseFormat> result;
245
246                 // default test
247                 testSubject = createTestSubject();
248         }
249
250         
251         @Test
252         public void testValidateTagsListAndRemoveDuplicates() throws Exception {
253                 ProductBusinessLogic testSubject;
254                 User user = null;
255                 Product product = null;
256                 String oldProductName = "";
257                 AuditingActionEnum actionEnum = null;
258                 Either<Boolean, ResponseFormat> result;
259
260                 // default test
261                 testSubject = createTestSubject();
262         }
263
264         
265         @Test
266         public void testUpdateProductMetadata() throws Exception {
267                 ProductBusinessLogic testSubject;
268                 String productId = "";
269                 Product updatedProduct = null;
270                 User user = null;
271                 Either<Product, ResponseFormat> result;
272
273                 // test 1
274                 testSubject = createTestSubject();
275                 updatedProduct = null;
276         }
277
278         
279         @Test
280         public void testValidateAndUpdateProductMetadata() throws Exception {
281                 ProductBusinessLogic testSubject;
282                 User user = null;
283                 Product currentProduct = null;
284                 Product updatedProduct = null;
285                 Either<Product, ResponseFormat> result;
286
287                 // default test
288                 testSubject = createTestSubject();
289                 
290         }
291
292         
293         @Test
294         public void testValidateAndUpdateProductName() throws Exception {
295                 ProductBusinessLogic testSubject;
296                 User user = null;
297                 Product currentProduct = null;
298                 Product updatedProduct = null;
299                 Either<Boolean, ResponseFormat> result;
300
301                 // default test
302                 testSubject = createTestSubject();
303                 
304         }
305
306         
307         @Test
308         public void testValidateAndUpdateFullName() throws Exception {
309                 ProductBusinessLogic testSubject;
310                 User user = null;
311                 Product currentProduct = null;
312                 Product updatedProduct = null;
313                 Either<Boolean, ResponseFormat> result;
314
315                 // default test
316                 testSubject = createTestSubject();
317                 
318         }
319
320         
321         @Test
322         public void testValidateAndUpdateCategory() throws Exception {
323                 ProductBusinessLogic testSubject;
324                 User user = null;
325                 Product currentProduct = null;
326                 Product updatedProduct = null;
327                 Either<Boolean, ResponseFormat> result;
328
329                 // default test
330                 testSubject = createTestSubject();
331                 
332         }
333
334         
335         @Test
336         public void testValidateAndUpdateContactList() throws Exception {
337                 ProductBusinessLogic testSubject;
338                 User user = null;
339                 Product currentProduct = null;
340                 Product updatedProduct = null;
341                 Either<Boolean, ResponseFormat> result;
342
343                 // default test
344                 testSubject = createTestSubject();
345                 
346         }
347
348         
349         @Test
350         public void testValidateAndUpdateTags() throws Exception {
351                 ProductBusinessLogic testSubject;
352                 User user = null;
353                 Product currentProduct = null;
354                 Product updatedProduct = null;
355                 Either<Boolean, ResponseFormat> result;
356
357                 // default test
358                 testSubject = createTestSubject();
359                 
360         }
361
362         
363         @Test
364         public void testValidateTagPattern() throws Exception {
365                 ProductBusinessLogic testSubject;
366                 String tag = "";
367                 boolean result;
368
369                 // default test
370                 testSubject = createTestSubject();
371                 
372         }
373
374         
375         @Test
376         public void testGetProductByNameAndVersion() throws Exception {
377                 ProductBusinessLogic testSubject;
378                 String productName = "";
379                 String productVersion = "";
380                 String userId = "";
381                 Either<Product, ResponseFormat> result;
382
383                 // default test
384                 testSubject = createTestSubject();
385                 
386         }
387 }