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;
27 public class ConsumerDataDefinitionTest {
29 private ConsumerDataDefinition createTestSubject() {
30 return new ConsumerDataDefinition();
34 public void testCopyConstructor() throws Exception {
35 ConsumerDataDefinition testSubject;
39 testSubject = createTestSubject();
40 new ConsumerDataDefinition(testSubject);
44 public void testGetConsumerName() throws Exception {
45 ConsumerDataDefinition testSubject;
49 testSubject = createTestSubject();
50 result = testSubject.getConsumerName();
55 public void testSetConsumerName() throws Exception {
56 ConsumerDataDefinition testSubject;
57 String consumerName = "";
60 testSubject = createTestSubject();
61 testSubject.setConsumerName(consumerName);
66 public void testGetConsumerPassword() throws Exception {
67 ConsumerDataDefinition testSubject;
71 testSubject = createTestSubject();
72 result = testSubject.getConsumerPassword();
77 public void testSetConsumerPassword() throws Exception {
78 ConsumerDataDefinition testSubject;
79 String consumerPassword = "";
82 testSubject = createTestSubject();
83 testSubject.setConsumerPassword(consumerPassword);
88 public void testGetConsumerSalt() throws Exception {
89 ConsumerDataDefinition testSubject;
93 testSubject = createTestSubject();
94 result = testSubject.getConsumerSalt();
99 public void testSetConsumerSalt() throws Exception {
100 ConsumerDataDefinition testSubject;
101 String consumerSalt = "";
104 testSubject = createTestSubject();
105 testSubject.setConsumerSalt(consumerSalt);
110 public void testGetConsumerLastAuthenticationTime() throws Exception {
111 ConsumerDataDefinition testSubject;
115 testSubject = createTestSubject();
116 result = testSubject.getConsumerLastAuthenticationTime();
121 public void testSetConsumerLastAuthenticationTime() throws Exception {
122 ConsumerDataDefinition testSubject;
123 Long consumerLastAuthenticationTime = null;
126 testSubject = createTestSubject();
127 testSubject.setConsumerLastAuthenticationTime(consumerLastAuthenticationTime);
132 public void testGetConsumerDetailsLastupdatedtime() throws Exception {
133 ConsumerDataDefinition testSubject;
137 testSubject = createTestSubject();
138 result = testSubject.getConsumerDetailsLastupdatedtime();
143 public void testSetConsumerDetailsLastupdatedtime() throws Exception {
144 ConsumerDataDefinition testSubject;
145 Long consumerDetailsLastupdatedtime = null;
148 testSubject = createTestSubject();
149 testSubject.setConsumerDetailsLastupdatedtime(consumerDetailsLastupdatedtime);
154 public void testGetLastModfierAtuid() throws Exception {
155 ConsumerDataDefinition testSubject;
159 testSubject = createTestSubject();
160 result = testSubject.getLastModfierAtuid();
165 public void testSetLastModfierAtuid() throws Exception {
166 ConsumerDataDefinition testSubject;
167 String lastModfierAtuid = "";
170 testSubject = createTestSubject();
171 testSubject.setLastModfierAtuid(lastModfierAtuid);
176 public void testToString() throws Exception {
177 ConsumerDataDefinition testSubject;
181 testSubject = createTestSubject();
182 result = testSubject.toString();
187 public void testHashCode() throws Exception {
188 ConsumerDataDefinition testSubject;
192 testSubject = createTestSubject();
193 result = testSubject.hashCode();
198 public void testEquals() throws Exception {
199 ConsumerDataDefinition testSubject;
204 testSubject = createTestSubject();
206 result = testSubject.equals(obj);
207 Assert.assertEquals(false, result);
208 result = testSubject.equals(testSubject);
209 Assert.assertEquals(true, result);
210 result = testSubject.equals(new ConsumerDataDefinition(testSubject));
211 Assert.assertEquals(true, result);