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.resources.data.auditing;
23 import org.junit.Test;
24 import org.openecomp.sdc.be.resources.data.auditing.model.CommonAuditData;
26 import java.util.Date;
27 import java.util.UUID;
30 public class ConsumerEventTest {
32 private ConsumerEvent createTestSubject() {
33 return new ConsumerEvent();
37 public void testCtor() throws Exception {
39 new ConsumerEvent("mock", CommonAuditData.newBuilder().build(), "mock", "mock");
43 public void testFillFields() throws Exception {
44 ConsumerEvent testSubject;
47 testSubject = createTestSubject();
48 testSubject.fillFields();
53 public void testGetModifier() throws Exception {
54 ConsumerEvent testSubject;
58 testSubject = createTestSubject();
59 result = testSubject.getModifier();
64 public void testSetModifier() throws Exception {
65 ConsumerEvent testSubject;
69 testSubject = createTestSubject();
70 testSubject.setModifier(modifier);
75 public void testGetEcompUser() throws Exception {
76 ConsumerEvent testSubject;
80 testSubject = createTestSubject();
81 result = testSubject.getEcompUser();
86 public void testSetEcompUser() throws Exception {
87 ConsumerEvent testSubject;
88 String ecompUser = "";
91 testSubject = createTestSubject();
92 testSubject.setEcompUser(ecompUser);
97 public void testGetTimebaseduuid() throws Exception {
98 ConsumerEvent testSubject;
102 testSubject = createTestSubject();
103 result = testSubject.getTimebaseduuid();
108 public void testSetTimebaseduuid() throws Exception {
109 ConsumerEvent testSubject;
110 UUID timebaseduuid = null;
113 testSubject = createTestSubject();
114 testSubject.setTimebaseduuid(timebaseduuid);
119 public void testGetTimestamp1() throws Exception {
120 ConsumerEvent testSubject;
124 testSubject = createTestSubject();
125 result = testSubject.getTimestamp1();
130 public void testSetTimestamp1() throws Exception {
131 ConsumerEvent testSubject;
132 Date timestamp1 = null;
135 testSubject = createTestSubject();
136 testSubject.setTimestamp1(timestamp1);
141 public void testGetRequestId() throws Exception {
142 ConsumerEvent testSubject;
146 testSubject = createTestSubject();
147 result = testSubject.getRequestId();
152 public void testSetRequestId() throws Exception {
153 ConsumerEvent testSubject;
154 String requestId = "";
157 testSubject = createTestSubject();
158 testSubject.setRequestId(requestId);
163 public void testGetAction() throws Exception {
164 ConsumerEvent testSubject;
168 testSubject = createTestSubject();
169 result = testSubject.getAction();
174 public void testSetAction() throws Exception {
175 ConsumerEvent testSubject;
179 testSubject = createTestSubject();
180 testSubject.setAction(action);
185 public void testGetStatus() throws Exception {
186 ConsumerEvent testSubject;
190 testSubject = createTestSubject();
191 result = testSubject.getStatus();
196 public void testSetStatus() throws Exception {
197 ConsumerEvent testSubject;
201 testSubject = createTestSubject();
202 testSubject.setStatus(status);
207 public void testGetDesc() throws Exception {
208 ConsumerEvent testSubject;
212 testSubject = createTestSubject();
213 result = testSubject.getDesc();
218 public void testSetDesc() throws Exception {
219 ConsumerEvent testSubject;
223 testSubject = createTestSubject();
224 testSubject.setDesc(desc);
229 public void testToString() throws Exception {
230 ConsumerEvent testSubject;
234 testSubject = createTestSubject();
235 result = testSubject.toString();