add few more tests to BE components
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / components / impl / ElementBusinessLogicTest.java
1 package org.openecomp.sdc.be.components.impl;
2
3 import java.util.List;
4 import java.util.Map;
5 import java.util.Optional;
6 import java.util.Set;
7
8 import javax.annotation.Generated;
9
10 import org.apache.commons.httpclient.NameValuePair;
11 import org.apache.commons.lang3.tuple.ImmutablePair;
12 import org.apache.tinkerpop.gremlin.structure.T;
13 import org.junit.Assert;
14 import org.junit.Test;
15 import org.openecomp.sdc.be.dao.api.ActionStatus;
16 import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge;
17 import org.openecomp.sdc.be.datamodel.api.CategoryTypeEnum;
18 import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition;
19 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
20 import org.openecomp.sdc.be.datatypes.enums.FilterKeyEnum;
21 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
22 import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum;
23 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
24 import org.openecomp.sdc.be.model.ArtifactType;
25 import org.openecomp.sdc.be.model.Component;
26 import org.openecomp.sdc.be.model.DistributionStatusEnum;
27 import org.openecomp.sdc.be.model.LifecycleStateEnum;
28 import org.openecomp.sdc.be.model.PropertyScope;
29 import org.openecomp.sdc.be.model.Resource;
30 import org.openecomp.sdc.be.model.User;
31 import org.openecomp.sdc.be.model.category.CategoryDefinition;
32 import org.openecomp.sdc.be.model.category.GroupingDefinition;
33 import org.openecomp.sdc.be.model.category.SubCategoryDefinition;
34 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
35 import org.openecomp.sdc.be.resources.data.ComponentMetadataData;
36 import org.openecomp.sdc.be.resources.data.ResourceMetadataData;
37 import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
38 import org.openecomp.sdc.be.resources.data.category.SubCategoryData;
39 import org.openecomp.sdc.be.ui.model.UiCategories;
40 import org.openecomp.sdc.exception.ResponseFormat;
41
42 import com.google.common.util.concurrent.Service;
43 import com.thinkaurelius.titan.core.TitanGraph;
44
45 import fj.data.Either;
46 import io.swagger.annotations.Tag;
47
48
49 public class ElementBusinessLogicTest {
50
51         private ElementBusinessLogic createTestSubject() {
52                 return new ElementBusinessLogic();
53         }
54
55         
56         @Test
57         public void testGetFollowed() throws Exception {
58                 ElementBusinessLogic testSubject;
59                 User user = null;
60                 Either<Map<String, List<? extends Component>>, ResponseFormat> result;
61
62                 // default test
63                 testSubject = createTestSubject();
64         }
65
66         
67         
68         
69         @Test
70         public void testGetAllResourceCategories() throws Exception {
71                 ElementBusinessLogic testSubject;
72                 Either<List<CategoryDefinition>, ActionStatus> result;
73
74                 // default test
75                 testSubject = createTestSubject();
76         }
77
78         
79         @Test
80         public void testGetAllServiceCategories() throws Exception {
81                 ElementBusinessLogic testSubject;
82                 Either<List<CategoryDefinition>, ActionStatus> result;
83
84                 // default test
85                 testSubject = createTestSubject();
86         }
87
88         
89         @Test
90         public void testCreateCategory() throws Exception {
91                 ElementBusinessLogic testSubject;
92                 CategoryDefinition category = null;
93                 String componentTypeParamName = "";
94                 String userId = "";
95                 Either<CategoryDefinition, ResponseFormat> result;
96
97                 // test 1
98                 testSubject = createTestSubject();
99                 category = null;
100         }
101
102         
103         @Test
104         public void testCreateSubCategory() throws Exception {
105                 ElementBusinessLogic testSubject;
106                 SubCategoryDefinition subCategory = null;
107                 String componentTypeParamName = "";
108                 String parentCategoryId = "";
109                 String userId = "";
110                 Either<SubCategoryDefinition, ResponseFormat> result;
111
112                 // test 1
113                 testSubject = createTestSubject();
114                 subCategory = null;
115         }
116
117         
118         @Test
119         public void testCreateGrouping() throws Exception {
120                 ElementBusinessLogic testSubject;
121                 GroupingDefinition grouping = null;
122                 String componentTypeParamName = "";
123                 String grandParentCategoryId = "";
124                 String parentSubCategoryId = "";
125                 String userId = "";
126                 Either<GroupingDefinition, ResponseFormat> result;
127
128                 // test 1
129                 testSubject = createTestSubject();
130                 grouping = null;
131         }
132
133         
134         @Test
135         public void testGetAllCategories() throws Exception {
136                 ElementBusinessLogic testSubject;
137                 String componentType = "";
138                 String userId = "";
139                 Either<List<CategoryDefinition>, ResponseFormat> result;
140
141                 // test 1
142                 testSubject = createTestSubject();
143                 userId = null;
144
145                 // test 2
146                 testSubject = createTestSubject();
147                 userId = "";
148         }
149
150         
151         @Test
152         public void testGetAllCategories_1() throws Exception {
153                 ElementBusinessLogic testSubject;
154                 String userId = "";
155                 Either<UiCategories, ResponseFormat> result;
156
157                 // default test
158                 testSubject = createTestSubject();
159         }
160
161         
162         @Test
163         public void testDeleteCategory() throws Exception {
164                 ElementBusinessLogic testSubject;
165                 String categoryId = "";
166                 String componentTypeParamName = "";
167                 String userId = "";
168                 Either<CategoryDefinition, ResponseFormat> result;
169
170                 // default test
171                 testSubject = createTestSubject();
172         }
173
174         
175         @Test
176         public void testDeleteSubCategory() throws Exception {
177                 ElementBusinessLogic testSubject;
178                 String grandParentCategoryId = "";
179                 String parentSubCategoryId = "";
180                 String componentTypeParamName = "";
181                 String userId = "";
182                 Either<SubCategoryDefinition, ResponseFormat> result;
183
184                 // default test
185                 testSubject = createTestSubject();
186         }
187
188         
189         @Test
190         public void testDeleteGrouping() throws Exception {
191                 ElementBusinessLogic testSubject;
192                 String grandParentCategoryId = "";
193                 String parentSubCategoryId = "";
194                 String groupingId = "";
195                 String componentTypeParamName = "";
196                 String userId = "";
197                 Either<GroupingDefinition, ResponseFormat> result;
198
199                 // default test
200                 testSubject = createTestSubject();
201         }
202
203         
204
205         
206         @Test
207         public void testGetAllPropertyScopes() throws Exception {
208                 ElementBusinessLogic testSubject;
209                 String userId = "";
210                 Either<List<PropertyScope>, ActionStatus> result;
211
212                 // default test
213                 testSubject = createTestSubject();
214         }
215
216         
217         @Test
218         public void testGetAllArtifactTypes() throws Exception {
219                 ElementBusinessLogic testSubject;
220                 String userId = "";
221                 Either<List<ArtifactType>, ActionStatus> result;
222
223                 // default test
224                 testSubject = createTestSubject();
225         }
226
227         
228         @Test
229         public void testGetAllDeploymentArtifactTypes() throws Exception {
230                 ElementBusinessLogic testSubject;
231                 Either<Map<String, Object>, ActionStatus> result;
232
233                 // default test
234                 testSubject = createTestSubject();
235         }
236
237         
238         @Test
239         public void testGetDefaultHeatTimeout() throws Exception {
240                 ElementBusinessLogic testSubject;
241                 Either<Integer, ActionStatus> result;
242
243                 // default test
244                 testSubject = createTestSubject();
245         }
246
247         
248         @Test
249         public void testGetCatalogComponents() throws Exception {
250                 ElementBusinessLogic testSubject;
251                 String userId = "";
252                 List<OriginTypeEnum> excludeTypes = null;
253                 Either<Map<String, List<? extends Component>>, ResponseFormat> result;
254
255                 // default test
256                 testSubject = createTestSubject();
257         }
258
259         
260         @Test
261         public void testGetFilteredCatalogComponents() throws Exception {
262                 ElementBusinessLogic testSubject;
263                 String assetType = "";
264                 Map<FilterKeyEnum, String> filters = null;
265                 String query = "";
266                 Either<List<? extends Component>, ResponseFormat> result;
267
268                 // test 1
269                 testSubject = createTestSubject();
270                 query = null;
271
272                 // test 2
273                 testSubject = createTestSubject();
274                 query = "";
275
276                 // test 3
277                 testSubject = createTestSubject();
278                 filters = null;
279         }
280
281         
282         
283         
284         @Test
285         public void testGetCatalogComponentsByUuidAndAssetType() throws Exception {
286                 ElementBusinessLogic testSubject;
287                 String assetType = "";
288                 String uuid = "";
289                 Either<List<? extends Component>, ResponseFormat> result;
290
291                 // test 1
292                 testSubject = createTestSubject();
293                 assetType = null;
294
295                 // test 2
296                 testSubject = createTestSubject();
297                 assetType = "";
298
299                 // test 3
300                 testSubject = createTestSubject();
301                 assetType = null;
302
303                 // test 4
304                 testSubject = createTestSubject();
305                 assetType = "";
306         }
307
308         
309         @Test
310         public void testGetAllComponentTypesParamNames() throws Exception {
311                 ElementBusinessLogic testSubject;
312                 List<String> result;
313
314                 // default test
315                 testSubject = createTestSubject();
316                 result = testSubject.getAllComponentTypesParamNames();
317         }
318
319         
320         @Test
321         public void testGetAllSupportedRoles() throws Exception {
322                 ElementBusinessLogic testSubject;
323                 List<String> result;
324
325                 // default test
326                 testSubject = createTestSubject();
327                 result = testSubject.getAllSupportedRoles();
328         }
329
330         
331         @Test
332         public void testGetResourceTypesMap() throws Exception {
333                 ElementBusinessLogic testSubject;
334                 Either<Map<String, String>, ActionStatus> result;
335
336                 // default test
337                 testSubject = createTestSubject();
338         }
339
340         
341         
342
343         
344         @Test
345         public void testGetFilteredResouces() throws Exception {
346                 ElementBusinessLogic testSubject;
347                 Map<FilterKeyEnum, String> filters = null;
348                 boolean inTransaction = false;
349                 Either<List<Component>, StorageOperationStatus> result;
350
351                 // default test
352                 testSubject = createTestSubject();
353         }
354
355         
356
357 }