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