2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.be.components.merge.property;
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;
30 import java.util.HashMap;
31 import java.util.LinkedList;
32 import java.util.List;
35 public class PropertyInstanceMergeDataBuilderTest {
40 public void testBuildDataForMerging() throws Exception {
41 PropertyInstanceMergeDataBuilder testSubject;
43 List<InputDefinition> oldInputs = null;
45 List<InputDefinition> newInputs = null;
46 List<MergePropertyData> result;
50 result = PropertyInstanceMergeDataBuilder.buildDataForMerging(oldProps, oldInputs, newProps, newInputs);
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;
64 result = Deencapsulation.invoke(PropertyInstanceMergeDataBuilder.class, "buildMergeData", new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>());
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;
77 result = Deencapsulation.invoke(PropertyInstanceMergeDataBuilder.class, "buildMergePropertyData", new PropertyDataDefinition(), new HashMap<>(),
78 new PropertyDataDefinition(), new HashMap<>());
82 public void testGetOldGetInputNamesWhichExistInNewVersion() throws Exception {
83 PropertyInstanceMergeDataBuilder testSubject;
84 List<GetInputValueDataDefinition> getInputValues = null;
85 Map<String, InputDefinition> newInputsByName = null;
89 result = Deencapsulation.invoke(PropertyInstanceMergeDataBuilder.class, "getOldGetInputNamesWhichExistInNewVersion", new LinkedList<>(), new HashMap<>());
93 public void testGetOldDeclaredInputsByUser() throws Exception {
94 PropertyInstanceMergeDataBuilder testSubject;
95 List<GetInputValueDataDefinition> getInputValues = null;
96 Map<String, InputDefinition> oldInputsByName = null;
100 result = Deencapsulation.invoke(PropertyInstanceMergeDataBuilder.class, "getOldDeclaredInputsByUser", new LinkedList<>(), new HashMap<>());