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;
25 import org.openecomp.sdc.be.resources.data.auditing.model.DistributionData;
27 import java.util.Date;
28 import java.util.UUID;
31 public class DistributionDownloadEventTest {
33 private DistributionDownloadEvent createTestSubject() {
34 return new DistributionDownloadEvent();
38 public void testCtor() throws Exception {
39 new DistributionDownloadEvent();
40 new DistributionDownloadEvent("mock", CommonAuditData.newBuilder().build(), new DistributionData("mock", "mock"));
44 public void testFillFields() throws Exception {
45 DistributionDownloadEvent testSubject;
48 testSubject = createTestSubject();
49 testSubject.fillFields();
54 public void testGetConsumerId() throws Exception {
55 DistributionDownloadEvent testSubject;
59 testSubject = createTestSubject();
60 result = testSubject.getConsumerId();
65 public void testSetConsumerId() throws Exception {
66 DistributionDownloadEvent testSubject;
67 String consumerId = "";
70 testSubject = createTestSubject();
71 testSubject.setConsumerId(consumerId);
76 public void testGetResourceUrl() throws Exception {
77 DistributionDownloadEvent testSubject;
81 testSubject = createTestSubject();
82 result = testSubject.getResourceUrl();
87 public void testSetResourceUrl() throws Exception {
88 DistributionDownloadEvent testSubject;
89 String resourceUrl = "";
92 testSubject = createTestSubject();
93 testSubject.setResourceUrl(resourceUrl);
98 public void testGetTimebaseduuid() throws Exception {
99 DistributionDownloadEvent testSubject;
103 testSubject = createTestSubject();
104 result = testSubject.getTimebaseduuid();
109 public void testSetTimebaseduuid() throws Exception {
110 DistributionDownloadEvent testSubject;
111 UUID timebaseduuid = null;
114 testSubject = createTestSubject();
115 testSubject.setTimebaseduuid(timebaseduuid);
120 public void testGetTimestamp1() throws Exception {
121 DistributionDownloadEvent testSubject;
125 testSubject = createTestSubject();
126 result = testSubject.getTimestamp1();
131 public void testSetTimestamp1() throws Exception {
132 DistributionDownloadEvent testSubject;
133 Date timestamp1 = null;
136 testSubject = createTestSubject();
137 testSubject.setTimestamp1(timestamp1);
142 public void testGetRequestId() throws Exception {
143 DistributionDownloadEvent testSubject;
147 testSubject = createTestSubject();
148 result = testSubject.getRequestId();
153 public void testSetRequestId() throws Exception {
154 DistributionDownloadEvent testSubject;
155 String requestId = "";
158 testSubject = createTestSubject();
159 testSubject.setRequestId(requestId);
164 public void testGetServiceInstanceId() throws Exception {
165 DistributionDownloadEvent testSubject;
169 testSubject = createTestSubject();
170 result = testSubject.getServiceInstanceId();
175 public void testSetServiceInstanceId() throws Exception {
176 DistributionDownloadEvent testSubject;
177 String serviceInstanceId = "";
180 testSubject = createTestSubject();
181 testSubject.setServiceInstanceId(serviceInstanceId);
186 public void testGetAction() throws Exception {
187 DistributionDownloadEvent testSubject;
191 testSubject = createTestSubject();
192 result = testSubject.getAction();
197 public void testSetAction() throws Exception {
198 DistributionDownloadEvent testSubject;
202 testSubject = createTestSubject();
203 testSubject.setAction(action);
208 public void testGetStatus() throws Exception {
209 DistributionDownloadEvent testSubject;
213 testSubject = createTestSubject();
214 result = testSubject.getStatus();
219 public void testSetStatus() throws Exception {
220 DistributionDownloadEvent testSubject;
224 testSubject = createTestSubject();
225 testSubject.setStatus(status);
230 public void testGetDesc() throws Exception {
231 DistributionDownloadEvent testSubject;
235 testSubject = createTestSubject();
236 result = testSubject.getDesc();
241 public void testSetDesc() throws Exception {
242 DistributionDownloadEvent testSubject;
246 testSubject = createTestSubject();
247 testSubject.setDesc(desc);
252 public void testToString() throws Exception {
253 DistributionDownloadEvent testSubject;
257 testSubject = createTestSubject();
258 result = testSubject.toString();