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.CommonAuditData.Builder;
27 import java.util.Date;
28 import java.util.UUID;
30 public class CategoryEventTest {
32 private CategoryEvent createTestSubject() {
33 return new CategoryEvent();
37 public void testCtor() throws Exception {
39 Builder newBuilder = CommonAuditData.newBuilder();
40 new CategoryEvent("mock", newBuilder.build(), "mock", "mock", "mock", "mock", "mock");
44 public void testFillFields() throws Exception {
45 CategoryEvent testSubject;
48 testSubject = createTestSubject();
49 testSubject.fillFields();
53 public void testGetTimebaseduuid() throws Exception {
54 CategoryEvent testSubject;
58 testSubject = createTestSubject();
59 result = testSubject.getTimebaseduuid();
63 public void testSetTimebaseduuid() throws Exception {
64 CategoryEvent testSubject;
65 UUID timebaseduuid = null;
68 testSubject = createTestSubject();
69 testSubject.setTimebaseduuid(timebaseduuid);
73 public void testGetAction() throws Exception {
74 CategoryEvent testSubject;
78 testSubject = createTestSubject();
79 result = testSubject.getAction();
83 public void testSetAction() throws Exception {
84 CategoryEvent testSubject;
88 testSubject = createTestSubject();
89 testSubject.setAction(action);
93 public void testGetStatus() throws Exception {
94 CategoryEvent testSubject;
98 testSubject = createTestSubject();
99 result = testSubject.getStatus();
103 public void testSetStatus() throws Exception {
104 CategoryEvent testSubject;
108 testSubject = createTestSubject();
109 testSubject.setStatus(status);
113 public void testGetDesc() throws Exception {
114 CategoryEvent testSubject;
118 testSubject = createTestSubject();
119 result = testSubject.getDesc();
123 public void testSetDesc() throws Exception {
124 CategoryEvent testSubject;
128 testSubject = createTestSubject();
129 testSubject.setDesc(desc);
133 public void testGetCategoryName() throws Exception {
134 CategoryEvent testSubject;
138 testSubject = createTestSubject();
139 result = testSubject.getCategoryName();
143 public void testSetCategoryName() throws Exception {
144 CategoryEvent testSubject;
145 String categoryName = "";
148 testSubject = createTestSubject();
149 testSubject.setCategoryName(categoryName);
153 public void testGetSubCategoryName() throws Exception {
154 CategoryEvent testSubject;
158 testSubject = createTestSubject();
159 result = testSubject.getSubCategoryName();
163 public void testSetSubCategoryName() throws Exception {
164 CategoryEvent testSubject;
165 String subCategoryName = "";
168 testSubject = createTestSubject();
169 testSubject.setSubCategoryName(subCategoryName);
173 public void testGetGroupingName() throws Exception {
174 CategoryEvent testSubject;
178 testSubject = createTestSubject();
179 result = testSubject.getGroupingName();
183 public void testSetGroupingName() throws Exception {
184 CategoryEvent testSubject;
185 String groupingName = "";
188 testSubject = createTestSubject();
189 testSubject.setGroupingName(groupingName);
193 public void testGetTimestamp1() throws Exception {
194 CategoryEvent testSubject;
198 testSubject = createTestSubject();
199 result = testSubject.getTimestamp1();
203 public void testSetTimestamp1() throws Exception {
204 CategoryEvent testSubject;
205 Date timestamp1 = null;
208 testSubject = createTestSubject();
209 testSubject.setTimestamp1(timestamp1);
213 public void testGetModifier() throws Exception {
214 CategoryEvent testSubject;
218 testSubject = createTestSubject();
219 result = testSubject.getModifier();
223 public void testSetModifier() throws Exception {
224 CategoryEvent testSubject;
225 String modifier = "";
228 testSubject = createTestSubject();
229 testSubject.setModifier(modifier);
233 public void testGetServiceInstanceId() throws Exception {
234 CategoryEvent testSubject;
238 testSubject = createTestSubject();
239 result = testSubject.getServiceInstanceId();
243 public void testSetServiceInstanceId() throws Exception {
244 CategoryEvent testSubject;
245 String serviceInstanceId = "";
248 testSubject = createTestSubject();
249 testSubject.setServiceInstanceId(serviceInstanceId);
253 public void testGetResourceType() throws Exception {
254 CategoryEvent testSubject;
258 testSubject = createTestSubject();
259 result = testSubject.getResourceType();
263 public void testSetResourceType() throws Exception {
264 CategoryEvent testSubject;
265 String resourceType = "";
268 testSubject = createTestSubject();
269 testSubject.setResourceType(resourceType);
273 public void testGetRequestId() throws Exception {
274 CategoryEvent testSubject;
278 testSubject = createTestSubject();
279 result = testSubject.getRequestId();
283 public void testSetRequestId() throws Exception {
284 CategoryEvent testSubject;
285 String requestId = "";
288 testSubject = createTestSubject();
289 testSubject.setRequestId(requestId);