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.Assert;
24 import org.junit.Test;
26 public class ForwardingPathElementDataDefinitionTest {
28 private ForwardingPathElementDataDefinition createTestSubject() {
29 return new ForwardingPathElementDataDefinition();
33 public void testConstructors() throws Exception {
34 ForwardingPathElementDataDefinition testSubject;
38 testSubject = createTestSubject();
39 new ForwardingPathElementDataDefinition(testSubject);
40 new ForwardingPathElementDataDefinition("mock", "mock", "mock", "mock", "mock", "mock");
44 public void testGetFromNode() throws Exception {
45 ForwardingPathElementDataDefinition testSubject;
49 testSubject = createTestSubject();
50 result = testSubject.getFromNode();
54 public void testSetFromNode() throws Exception {
55 ForwardingPathElementDataDefinition testSubject;
59 testSubject = createTestSubject();
60 testSubject.setFromNode(fromNode);
64 public void testGetToNode() throws Exception {
65 ForwardingPathElementDataDefinition testSubject;
69 testSubject = createTestSubject();
70 result = testSubject.getToNode();
74 public void testSetToNode() throws Exception {
75 ForwardingPathElementDataDefinition testSubject;
79 testSubject = createTestSubject();
80 testSubject.setToNode(toNode);
84 public void testGetFromCP() throws Exception {
85 ForwardingPathElementDataDefinition testSubject;
89 testSubject = createTestSubject();
90 result = testSubject.getFromCP();
94 public void testSetFromCP() throws Exception {
95 ForwardingPathElementDataDefinition testSubject;
99 testSubject = createTestSubject();
100 testSubject.setFromCP(fromCP);
104 public void testGetToCP() throws Exception {
105 ForwardingPathElementDataDefinition testSubject;
109 testSubject = createTestSubject();
110 result = testSubject.getToCP();
114 public void testSetToCP() throws Exception {
115 ForwardingPathElementDataDefinition testSubject;
119 testSubject = createTestSubject();
120 testSubject.setToCP(toCP);
124 public void testGetToCPOriginId() throws Exception {
125 ForwardingPathElementDataDefinition testSubject;
129 testSubject = createTestSubject();
130 result = testSubject.getToCPOriginId();
134 public void testSetToCPOriginId() throws Exception {
135 ForwardingPathElementDataDefinition testSubject;
136 String toCPOriginId = "";
139 testSubject = createTestSubject();
140 testSubject.setToCPOriginId(toCPOriginId);
144 public void testGetFromCPOriginId() throws Exception {
145 ForwardingPathElementDataDefinition testSubject;
149 testSubject = createTestSubject();
150 result = testSubject.getFromCPOriginId();
154 public void testSetFromCPOriginId() throws Exception {
155 ForwardingPathElementDataDefinition testSubject;
156 String fromCPOriginId = "";
159 testSubject = createTestSubject();
160 testSubject.setFromCPOriginId(fromCPOriginId);
164 public void testEquals() throws Exception {
165 ForwardingPathElementDataDefinition testSubject;
170 testSubject = createTestSubject();
171 result = testSubject.equals(o);
172 Assert.assertEquals(false, result);
173 result = testSubject.equals(testSubject);
174 Assert.assertEquals(true, result);
175 result = testSubject.equals(createTestSubject());
176 Assert.assertEquals(true, result);
180 public void testHashCode() throws Exception {
181 ForwardingPathElementDataDefinition testSubject;
185 testSubject = createTestSubject();
186 result = testSubject.hashCode();
190 public void testToString() throws Exception {
191 ForwardingPathElementDataDefinition testSubject;
195 testSubject = createTestSubject();
196 result = testSubject.toString();