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.resources.data;
23 import org.junit.Test;
24 import org.openecomp.sdc.be.datatypes.elements.PropertyRule;
26 import java.util.HashMap;
27 import java.util.List;
31 public class PropertyValueDataTest {
33 private PropertyValueData createTestSubject() {
34 return new PropertyValueData();
38 public void testCtor() throws Exception {
39 new PropertyValueData(new HashMap<>());
43 public void testGetUniqueId() throws Exception {
44 PropertyValueData testSubject;
48 testSubject = createTestSubject();
49 result = testSubject.getUniqueId();
54 public void testSetUniqueId() throws Exception {
55 PropertyValueData testSubject;
59 testSubject = createTestSubject();
60 testSubject.setUniqueId(uniqueId);
65 public void testGetType() throws Exception {
66 PropertyValueData testSubject;
70 testSubject = createTestSubject();
71 result = testSubject.getType();
76 public void testSetType() throws Exception {
77 PropertyValueData testSubject;
81 testSubject = createTestSubject();
82 testSubject.setType(type);
87 public void testGetCreationTime() throws Exception {
88 PropertyValueData testSubject;
92 testSubject = createTestSubject();
93 result = testSubject.getCreationTime();
98 public void testSetCreationTime() throws Exception {
99 PropertyValueData testSubject;
100 Long creationTime = null;
103 testSubject = createTestSubject();
104 testSubject.setCreationTime(creationTime);
109 public void testGetModificationTime() throws Exception {
110 PropertyValueData testSubject;
114 testSubject = createTestSubject();
115 result = testSubject.getModificationTime();
120 public void testSetModificationTime() throws Exception {
121 PropertyValueData testSubject;
122 Long modificationTime = null;
125 testSubject = createTestSubject();
126 testSubject.setModificationTime(modificationTime);
131 public void testGetValue() throws Exception {
132 PropertyValueData testSubject;
136 testSubject = createTestSubject();
137 result = testSubject.getValue();
142 public void testSetValue() throws Exception {
143 PropertyValueData testSubject;
147 testSubject = createTestSubject();
148 testSubject.setValue(value);
153 public void testGetRules() throws Exception {
154 PropertyValueData testSubject;
155 List<PropertyRule> result;
158 testSubject = createTestSubject();
159 result = testSubject.getRules();
164 public void testSetRules() throws Exception {
165 PropertyValueData testSubject;
166 List<PropertyRule> rules = null;
169 testSubject = createTestSubject();
170 testSubject.setRules(rules);
175 public void testToGraphMap() throws Exception {
176 PropertyValueData testSubject;
177 Map<String, Object> result;
180 testSubject = createTestSubject();
181 result = testSubject.toGraphMap();
186 public void testToString() throws Exception {
187 PropertyValueData testSubject;
191 testSubject = createTestSubject();
192 result = testSubject.toString();