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.model;
23 import org.junit.Test;
24 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
25 import org.openecomp.sdc.be.datatypes.elements.PropertyRule;
27 import java.util.List;
30 public class ComponentInstanceInputTest {
32 private ComponentInstanceInput createTestSubject() {
33 return new ComponentInstanceInput();
37 public void testCtor() throws Exception {
38 new ComponentInstanceInput(new PropertyDataDefinition());
39 new ComponentInstanceInput(new InputDefinition(), "mock", "mock");
40 new ComponentInstanceInput(new PropertyDataDefinition(), "mock", "mock", "mock");
44 public void testGetComponentInstanceName() throws Exception {
45 ComponentInstanceInput testSubject;
49 testSubject = createTestSubject();
50 result = testSubject.getComponentInstanceName();
55 public void testSetComponentInstanceName() throws Exception {
56 ComponentInstanceInput testSubject;
57 String componentInstanceName = "";
60 testSubject = createTestSubject();
61 testSubject.setComponentInstanceName(componentInstanceName);
66 public void testGetComponentInstanceId() throws Exception {
67 ComponentInstanceInput testSubject;
71 testSubject = createTestSubject();
72 result = testSubject.getComponentInstanceId();
77 public void testSetComponentInstanceId() throws Exception {
78 ComponentInstanceInput testSubject;
79 String componentInstanceId = "";
82 testSubject = createTestSubject();
83 testSubject.setComponentInstanceId(componentInstanceId);
88 public void testGetValueUniqueUid() throws Exception {
89 ComponentInstanceInput testSubject;
93 testSubject = createTestSubject();
94 result = testSubject.getValueUniqueUid();
99 public void testSetValueUniqueUid() throws Exception {
100 ComponentInstanceInput testSubject;
101 String valueUniqueUid = "";
104 testSubject = createTestSubject();
105 testSubject.setValueUniqueUid(valueUniqueUid);
110 public void testGetPath() throws Exception {
111 ComponentInstanceInput testSubject;
115 testSubject = createTestSubject();
116 result = testSubject.getPath();
121 public void testSetPath() throws Exception {
122 ComponentInstanceInput testSubject;
123 List<String> path = null;
126 testSubject = createTestSubject();
127 testSubject.setPath(path);
132 public void testGetRules() throws Exception {
133 ComponentInstanceInput testSubject;
134 List<PropertyRule> result;
137 testSubject = createTestSubject();
138 result = testSubject.getRules();
143 public void testSetRules() throws Exception {
144 ComponentInstanceInput testSubject;
145 List<PropertyRule> rules = null;
148 testSubject = createTestSubject();
149 testSubject.setRules(rules);
154 public void testToString() throws Exception {
155 ComponentInstanceInput testSubject;
159 testSubject = createTestSubject();
160 result = testSubject.toString();