2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright 2019 TechMahindra
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.onap.dcaegen2.ves.domain.ves70;
\r
23 import static org.junit.Assert.assertNotNull;
\r
25 import org.junit.Test;
\r
26 import org.onap.dcaegen2.ves.domain.ves70.ObjectKey;
\r
29 public class ObjectKeyTest {
\r
31 private ObjectKey createTestSubject() {
\r
32 return new ObjectKey();
\r
36 public void testGetKeyName() throws Exception {
\r
37 ObjectKey testSubject;
\r
41 testSubject = createTestSubject();
\r
42 result = testSubject.getKeyName();
\r
46 public void testSetKeyName() throws Exception {
\r
47 ObjectKey testSubject;
\r
48 String keyName = "";
\r
51 testSubject = createTestSubject();
\r
52 testSubject.setKeyName(keyName);
\r
56 public void testGetKeyOrder() throws Exception {
\r
57 ObjectKey testSubject;
\r
61 testSubject = createTestSubject();
\r
62 result = testSubject.getKeyOrder();
\r
66 public void testSetKeyOrder() throws Exception {
\r
67 ObjectKey testSubject;
\r
68 Integer keyOrder = 0;
\r
71 testSubject = createTestSubject();
\r
72 testSubject.setKeyOrder(keyOrder);
\r
76 public void testGetKeyValue() throws Exception {
\r
77 ObjectKey testSubject;
\r
81 testSubject = createTestSubject();
\r
82 result = testSubject.getKeyValue();
\r
86 public void testSetKeyValue() throws Exception {
\r
87 ObjectKey testSubject;
\r
88 String keyValue = "";
\r
91 testSubject = createTestSubject();
\r
92 testSubject.setKeyValue(keyValue);
\r
96 public void testToString() throws Exception {
\r
97 ObjectKey testSubject;
\r
101 testSubject = createTestSubject();
\r
102 result = testSubject.toString();
\r
106 public void testHashCode() throws Exception {
\r
107 ObjectKey testSubject;
\r
111 testSubject = createTestSubject();
\r
112 result = testSubject.hashCode();
\r
116 public void testEquals() throws Exception {
\r
117 ObjectKey testSubject;
\r
118 ObjectKey testSubject2;
\r
119 Object other = null;
\r
123 testSubject = createTestSubject();
\r
124 testSubject2 = createTestSubject();
\r
125 result = testSubject.equals(other);
\r
126 result = testSubject.equals(testSubject);
\r
127 result = testSubject.equals(testSubject2);
\r
128 assertNotNull(result);
\r