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.datatypes.elements;
23 import org.junit.Test;
25 import java.util.List;
28 public class MapComponentInstanceExternalRefsTest {
30 private MapComponentInstanceExternalRefs createTestSubject() {
31 return new MapComponentInstanceExternalRefs();
35 public void testGetComponentInstanceExternalRefs() throws Exception {
36 MapComponentInstanceExternalRefs testSubject;
37 Map<String, List<String>> result;
40 testSubject = createTestSubject();
41 result = testSubject.getComponentInstanceExternalRefs();
45 public void testGetExternalRefsByObjectType() throws Exception {
46 MapComponentInstanceExternalRefs testSubject;
47 String objectType = "";
51 testSubject = createTestSubject();
52 result = testSubject.getExternalRefsByObjectType(objectType);
56 public void testSetComponentInstanceExternalRefs() throws Exception {
57 MapComponentInstanceExternalRefs testSubject;
58 Map<String, List<String>> componentInstanceExternalRefs = null;
61 testSubject = createTestSubject();
62 testSubject.setComponentInstanceExternalRefs(componentInstanceExternalRefs);
66 public void testAddExternalRef() throws Exception {
67 MapComponentInstanceExternalRefs testSubject;
68 String objectType = "";
73 testSubject = createTestSubject();
74 result = testSubject.addExternalRef(objectType, ref);
78 public void testDeleteExternalRef() throws Exception {
79 MapComponentInstanceExternalRefs testSubject;
80 String objectType = "";
85 testSubject = createTestSubject();
86 result = testSubject.deleteExternalRef(objectType, ref);
90 public void testReplaceExternalRef() throws Exception {
91 MapComponentInstanceExternalRefs testSubject;
92 String objectType = "";
98 testSubject = createTestSubject();
99 result = testSubject.replaceExternalRef(objectType, oldRef, newRef);