Added oparent to sdc main
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / components / merge / property / PropertyInstanceMergeDataBuilderTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 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.openecomp.sdc.be.components.merge.property;
22
23 import mockit.Deencapsulation;
24 import org.apache.tinkerpop.gremlin.structure.T;
25 import org.junit.Test;
26 import org.openecomp.sdc.be.datatypes.elements.GetInputValueDataDefinition;
27 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
28 import org.openecomp.sdc.be.model.InputDefinition;
29
30 import java.util.HashMap;
31 import java.util.LinkedList;
32 import java.util.List;
33 import java.util.Map;
34
35 public class PropertyInstanceMergeDataBuilderTest {
36
37
38
39         @Test
40         public void testBuildDataForMerging() throws Exception {
41                 PropertyInstanceMergeDataBuilder testSubject;
42                 List oldProps = null;
43                 List<InputDefinition> oldInputs = null;
44                 List newProps = null;
45                 List<InputDefinition> newInputs = null;
46                 List<MergePropertyData> result;
47
48                 // default test
49
50                 result = PropertyInstanceMergeDataBuilder.buildDataForMerging(oldProps, oldInputs, newProps, newInputs);
51         }
52
53         @Test
54         public void testBuildMergeData() throws Exception {
55                 PropertyInstanceMergeDataBuilder testSubject;
56                 Map<String, T> oldPropsByName = null;
57                 Map<String, InputDefinition> oldInputsByName = null;
58                 Map<String, T> newPropsByName = null;
59                 Map<String, InputDefinition> newInputsByName = null;
60                 List<MergePropertyData> result;
61
62                 // default test
63
64                 result = Deencapsulation.invoke(PropertyInstanceMergeDataBuilder.class, "buildMergeData", new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>());
65         }
66
67         @Test
68         public void testBuildMergePropertyData() throws Exception {
69                 PropertyInstanceMergeDataBuilder testSubject;
70                 PropertyDataDefinition oldProp = null;
71                 Map<String, InputDefinition> oldInputsByName = null;
72                 PropertyDataDefinition newProp = null;
73                 Map<String, InputDefinition> newInputsByName = null;
74                 MergePropertyData result;
75
76                 // default test
77                 result = Deencapsulation.invoke(PropertyInstanceMergeDataBuilder.class, "buildMergePropertyData", new PropertyDataDefinition(), new HashMap<>(),
78                                 new PropertyDataDefinition(), new HashMap<>());
79         }
80
81         @Test
82         public void testGetOldGetInputNamesWhichExistInNewVersion() throws Exception {
83                 PropertyInstanceMergeDataBuilder testSubject;
84                 List<GetInputValueDataDefinition> getInputValues = null;
85                 Map<String, InputDefinition> newInputsByName = null;
86                 List<String> result;
87
88                 // default test
89                 result = Deencapsulation.invoke(PropertyInstanceMergeDataBuilder.class, "getOldGetInputNamesWhichExistInNewVersion", new LinkedList<>(), new HashMap<>());
90         }
91
92         @Test
93         public void testGetOldDeclaredInputsByUser() throws Exception {
94                 PropertyInstanceMergeDataBuilder testSubject;
95                 List<GetInputValueDataDefinition> getInputValues = null;
96                 Map<String, InputDefinition> oldInputsByName = null;
97                 List<String> result;
98
99                 // default test
100                 result = Deencapsulation.invoke(PropertyInstanceMergeDataBuilder.class, "getOldDeclaredInputsByUser", new LinkedList<>(), new HashMap<>());
101         }
102 }