Added oparent to sdc main
[sdc.git] / common-be / src / test / java / org / openecomp / sdc / be / datatypes / elements / MapGroupsDataDefinitionTest.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.datatypes.elements;
22
23 import org.apache.commons.collections.map.HashedMap;
24 import org.junit.Test;
25
26 import java.util.Map;
27
28 public class MapGroupsDataDefinitionTest {
29
30         private MapGroupsDataDefinition createTestSubject() {
31                 return new MapGroupsDataDefinition();
32         }
33         
34         @Test
35         public void testConstructors() throws Exception {
36                 MapGroupsDataDefinition testSubject;
37                 Map<String, GroupInstanceDataDefinition> result;
38
39                 // default test
40                 new MapGroupsDataDefinition(new HashedMap());
41                 new MapGroupsDataDefinition(new MapDataDefinition<>(), "");
42         }
43         
44         @Test
45         public void testGetMapToscaDataDefinition() throws Exception {
46                 MapGroupsDataDefinition testSubject;
47                 Map<String, GroupInstanceDataDefinition> result;
48
49                 // default test
50                 testSubject = createTestSubject();
51                 result = testSubject.getMapToscaDataDefinition();
52         }
53
54         @Test
55         public void testSetMapToscaDataDefinition() throws Exception {
56                 MapGroupsDataDefinition testSubject;
57                 Map<String, GroupInstanceDataDefinition> mapToscaDataDefinition = null;
58
59                 // default test
60                 testSubject = createTestSubject();
61                 testSubject.setMapToscaDataDefinition(mapToscaDataDefinition);
62         }
63
64         @Test
65         public void testGetParentName() throws Exception {
66                 MapGroupsDataDefinition testSubject;
67                 String result;
68
69                 // default test
70                 testSubject = createTestSubject();
71                 result = testSubject.getParentName();
72         }
73
74         @Test
75         public void testSetParentName() throws Exception {
76                 MapGroupsDataDefinition testSubject;
77                 String parentName = "";
78
79                 // default test
80                 testSubject = createTestSubject();
81                 testSubject.setParentName(parentName);
82         }
83 }