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.OperationalEnvAuditData;
26 import org.openecomp.sdc.be.resources.data.auditing.model.ResourceCommonInfo;
27 import org.openecomp.sdc.be.resources.data.auditing.model.ResourceVersionInfo;
29 import java.util.Date;
30 import java.util.UUID;
32 public class DistributionNotificationEventTest {
34 private DistributionNotificationEvent createTestSubject() {
35 return new DistributionNotificationEvent();
39 public void testCtor() throws Exception {
40 new DistributionNotificationEvent();
41 new DistributionNotificationEvent("mock", CommonAuditData.newBuilder().build(), new ResourceCommonInfo(),ResourceVersionInfo.newBuilder().build() , "mock", "mock", "mock", new OperationalEnvAuditData("mock", "mock", "mock"));
45 public void testFillFields() throws Exception {
46 DistributionNotificationEvent testSubject;
49 testSubject = createTestSubject();
50 testSubject.fillFields();
55 public void testGetResourceName() throws Exception {
56 DistributionNotificationEvent testSubject;
60 testSubject = createTestSubject();
61 result = testSubject.getResourceName();
66 public void testSetResourceName() throws Exception {
67 DistributionNotificationEvent testSubject;
68 String resourceName = "";
71 testSubject = createTestSubject();
72 testSubject.setResourceName(resourceName);
77 public void testGetResourceType() throws Exception {
78 DistributionNotificationEvent testSubject;
82 testSubject = createTestSubject();
83 result = testSubject.getResourceType();
88 public void testSetResourceType() throws Exception {
89 DistributionNotificationEvent testSubject;
90 String resourceType = "";
93 testSubject = createTestSubject();
94 testSubject.setResourceType(resourceType);
99 public void testGetCurrVersion() throws Exception {
100 DistributionNotificationEvent testSubject;
104 testSubject = createTestSubject();
105 result = testSubject.getCurrVersion();
110 public void testSetCurrVersion() throws Exception {
111 DistributionNotificationEvent testSubject;
112 String currVersion = "";
115 testSubject = createTestSubject();
116 testSubject.setCurrVersion(currVersion);
121 public void testGetCurrState() throws Exception {
122 DistributionNotificationEvent testSubject;
126 testSubject = createTestSubject();
127 result = testSubject.getCurrState();
132 public void testSetCurrState() throws Exception {
133 DistributionNotificationEvent testSubject;
134 String currState = "";
137 testSubject = createTestSubject();
138 testSubject.setCurrState(currState);
143 public void testGetTopicName() throws Exception {
144 DistributionNotificationEvent testSubject;
148 testSubject = createTestSubject();
149 result = testSubject.getTopicName();
154 public void testSetTopicName() throws Exception {
155 DistributionNotificationEvent testSubject;
156 String topicName = "";
159 testSubject = createTestSubject();
160 testSubject.setTopicName(topicName);
165 public void testGetTimebaseduuid() throws Exception {
166 DistributionNotificationEvent testSubject;
170 testSubject = createTestSubject();
171 result = testSubject.getTimebaseduuid();
176 public void testSetTimebaseduuid() throws Exception {
177 DistributionNotificationEvent testSubject;
178 UUID timebaseduuid = null;
181 testSubject = createTestSubject();
182 testSubject.setTimebaseduuid(timebaseduuid);
187 public void testGetTimestamp1() throws Exception {
188 DistributionNotificationEvent testSubject;
192 testSubject = createTestSubject();
193 result = testSubject.getTimestamp1();
198 public void testSetTimestamp1() throws Exception {
199 DistributionNotificationEvent testSubject;
200 Date timestamp1 = null;
203 testSubject = createTestSubject();
204 testSubject.setTimestamp1(timestamp1);
209 public void testGetRequestId() throws Exception {
210 DistributionNotificationEvent testSubject;
214 testSubject = createTestSubject();
215 result = testSubject.getRequestId();
220 public void testSetRequestId() throws Exception {
221 DistributionNotificationEvent testSubject;
222 String requestId = "";
225 testSubject = createTestSubject();
226 testSubject.setRequestId(requestId);
231 public void testGetServiceInstanceId() throws Exception {
232 DistributionNotificationEvent testSubject;
236 testSubject = createTestSubject();
237 result = testSubject.getServiceInstanceId();
242 public void testSetServiceInstanceId() throws Exception {
243 DistributionNotificationEvent testSubject;
244 String serviceInstanceId = "";
247 testSubject = createTestSubject();
248 testSubject.setServiceInstanceId(serviceInstanceId);
253 public void testGetAction() throws Exception {
254 DistributionNotificationEvent testSubject;
258 testSubject = createTestSubject();
259 result = testSubject.getAction();
264 public void testSetAction() throws Exception {
265 DistributionNotificationEvent testSubject;
269 testSubject = createTestSubject();
270 testSubject.setAction(action);
275 public void testGetStatus() throws Exception {
276 DistributionNotificationEvent testSubject;
280 testSubject = createTestSubject();
281 result = testSubject.getStatus();
286 public void testSetStatus() throws Exception {
287 DistributionNotificationEvent testSubject;
291 testSubject = createTestSubject();
292 testSubject.setStatus(status);
297 public void testGetDesc() throws Exception {
298 DistributionNotificationEvent testSubject;
302 testSubject = createTestSubject();
303 result = testSubject.getDesc();
308 public void testSetDesc() throws Exception {
309 DistributionNotificationEvent testSubject;
313 testSubject = createTestSubject();
314 testSubject.setDesc(desc);
319 public void testGetModifier() throws Exception {
320 DistributionNotificationEvent testSubject;
324 testSubject = createTestSubject();
325 result = testSubject.getModifier();
330 public void testSetModifier() throws Exception {
331 DistributionNotificationEvent testSubject;
332 String modifier = "";
335 testSubject = createTestSubject();
336 testSubject.setModifier(modifier);
341 public void testGetDid() throws Exception {
342 DistributionNotificationEvent testSubject;
346 testSubject = createTestSubject();
347 result = testSubject.getDid();
352 public void testSetDid() throws Exception {
353 DistributionNotificationEvent testSubject;
357 testSubject = createTestSubject();
358 testSubject.setDid(did);
363 public void testToString() throws Exception {
364 DistributionNotificationEvent testSubject;
368 testSubject = createTestSubject();
369 result = testSubject.toString();
373 public void testSetVnfWorkloadContext() throws Exception {
374 DistributionNotificationEvent testSubject;
377 testSubject = createTestSubject();
378 testSubject.setVnfWorkloadContext("mock");
382 public void testSetEnvId() throws Exception {
383 DistributionNotificationEvent testSubject;
386 testSubject = createTestSubject();
387 testSubject.setEnvId("mock");
391 public void testSetTenant() throws Exception {
392 DistributionNotificationEvent testSubject;
395 testSubject = createTestSubject();
396 testSubject.setTenant("mock");