3 * Copyright (c) 2018 AT&T Intellectual Property.
7 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
19 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 * See the License for the specific language governing permissions and
27 * limitations under the License.
31 package org.openecomp.sdc.be.datamodel;
33 import org.junit.Test;
37 public class NameIdPairTest {
39 private NameIdPair createTestSubject() {
40 return new NameIdPair("", "");
44 public void testGetName() throws Exception {
45 NameIdPair testSubject;
49 testSubject = createTestSubject();
50 result = testSubject.getName();
54 public void testConstructorWith3Parameters() throws Exception {
55 NameIdPair testSubject;
59 testSubject = new NameIdPair("", "","");
60 result = testSubject.getOwnerId();
64 public void testSetName() throws Exception {
65 NameIdPair testSubject;
69 testSubject = createTestSubject();
70 testSubject.setName(name);
74 public void testGetId() throws Exception {
75 NameIdPair testSubject;
79 testSubject = createTestSubject();
80 result = testSubject.getId();
84 public void testSetId() throws Exception {
85 NameIdPair testSubject;
89 testSubject = createTestSubject();
90 testSubject.setId(id);
94 public void testGetOwnerId() throws Exception {
95 NameIdPair testSubject;
99 testSubject = createTestSubject();
100 testSubject.put("ownerId", "mock");
101 result = testSubject.getOwnerId();
105 public void testSetOwnerId() throws Exception {
106 NameIdPair testSubject;
110 testSubject = createTestSubject();
111 testSubject.setOwnerId(ownerId);
115 public void testGetWrappedData() throws Exception {
116 NameIdPair testSubject;
117 Set<NameIdPairWrapper> result;
120 testSubject = createTestSubject();
121 result = testSubject.getWrappedData();
125 public void testSetWrappedData() throws Exception {
126 NameIdPair testSubject;
127 Set<NameIdPairWrapper> data = null;
130 testSubject = createTestSubject();
131 testSubject.setWrappedData(data);
135 public void testAddWrappedData() throws Exception {
136 NameIdPair testSubject;
137 NameIdPairWrapper nameIdPairWrapper = null;
140 testSubject = createTestSubject();
141 testSubject.addWrappedData(nameIdPairWrapper);
145 public void testEquals() throws Exception {
146 NameIdPair testSubject;
151 testSubject = createTestSubject();
152 result = testSubject.equals(o);
156 public void testHashCode() throws Exception {
157 NameIdPair testSubject;
161 testSubject = createTestSubject();
162 result = testSubject.hashCode();
166 public void testCreate() throws Exception {
172 result = NameIdPair.create(name, id);