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 ComponentInstancePropertyTest {
32 private ComponentInstanceProperty createTestSubject() {
33 return new ComponentInstanceProperty();
37 public void testCtor() throws Exception {
38 new ComponentInstanceProperty(new PropertyDataDefinition());
39 new ComponentInstanceProperty(new PropertyDefinition());
40 new ComponentInstanceProperty(false, new PropertyDefinition(), "mock");
41 new ComponentInstanceProperty(new PropertyDefinition(), "mock", "mock");
45 public void testGetComponentInstanceName() throws Exception {
46 ComponentInstanceProperty testSubject;
50 testSubject = createTestSubject();
51 result = testSubject.getComponentInstanceName();
56 public void testSetComponentInstanceName() throws Exception {
57 ComponentInstanceProperty testSubject;
58 String componentInstanceName = "";
61 testSubject = createTestSubject();
62 testSubject.setComponentInstanceName(componentInstanceName);
67 public void testGetComponentInstanceId() throws Exception {
68 ComponentInstanceProperty testSubject;
72 testSubject = createTestSubject();
73 result = testSubject.getComponentInstanceId();
78 public void testSetComponentInstanceId() throws Exception {
79 ComponentInstanceProperty testSubject;
80 String componentInstanceId = "";
83 testSubject = createTestSubject();
84 testSubject.setComponentInstanceId(componentInstanceId);
89 public void testGetValueUniqueUid() throws Exception {
90 ComponentInstanceProperty testSubject;
94 testSubject = createTestSubject();
95 result = testSubject.getValueUniqueUid();
100 public void testSetValueUniqueUid() throws Exception {
101 ComponentInstanceProperty testSubject;
102 String valueUniqueUid = "";
105 testSubject = createTestSubject();
106 testSubject.setValueUniqueUid(valueUniqueUid);
111 public void testGetPath() throws Exception {
112 ComponentInstanceProperty testSubject;
116 testSubject = createTestSubject();
117 result = testSubject.getPath();
122 public void testSetPath() throws Exception {
123 ComponentInstanceProperty testSubject;
124 List<String> path = null;
127 testSubject = createTestSubject();
128 testSubject.setPath(path);
133 public void testGetRules() throws Exception {
134 ComponentInstanceProperty testSubject;
135 List<PropertyRule> result;
138 testSubject = createTestSubject();
139 result = testSubject.getRules();
144 public void testSetRules() throws Exception {
145 ComponentInstanceProperty testSubject;
146 List<PropertyRule> rules = null;
149 testSubject = createTestSubject();
150 testSubject.setRules(rules);
155 public void testToString() throws Exception {
156 ComponentInstanceProperty testSubject;
160 testSubject = createTestSubject();
161 result = testSubject.toString();