2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright 2018 TechMahindra
\r
6 *=================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.onap.dcaegen2.ves.domain.ves7_0;
\r
23 import static org.junit.Assert.assertEquals;
\r
24 import static org.junit.Assert.assertNotNull;
\r
25 import java.util.List;
\r
26 import org.junit.Test;
\r
27 import org.onap.dcaegen2.ves.domain.ves7_0.ThresholdCrossingAlertFields.AlertAction;
\r
28 import org.onap.dcaegen2.ves.domain.ves7_0.ThresholdCrossingAlertFields.AlertType;
\r
29 import org.onap.dcaegen2.ves.domain.ves7_0.ThresholdCrossingAlertFields.ThresholdCrossingFieldsVersion;
\r
32 public class ThresholdCrossingAlertFieldsTest {
\r
34 private ThresholdCrossingAlertFields createTestSubject() {
\r
35 return new ThresholdCrossingAlertFields();
\r
39 public void testGetAdditionalFields() throws Exception {
\r
40 ThresholdCrossingAlertFields testSubject;
\r
41 AlarmAdditionalInformation result;
\r
44 testSubject = createTestSubject();
\r
45 result = testSubject.getAdditionalFields();
\r
49 public void testSetAdditionalFields() throws Exception {
\r
50 ThresholdCrossingAlertFields testSubject;
\r
51 AlarmAdditionalInformation additionalFields = null;
\r
54 testSubject = createTestSubject();
\r
55 testSubject.setAdditionalFields(additionalFields);
\r
59 public void testGetAdditionalParameters() throws Exception {
\r
60 ThresholdCrossingAlertFields testSubject;
\r
61 List<AdditionalParameter> result;
\r
64 testSubject = createTestSubject();
\r
65 result = testSubject.getAdditionalParameters();
\r
69 public void testSetAdditionalParameters() throws Exception {
\r
70 ThresholdCrossingAlertFields testSubject;
\r
71 List<AdditionalParameter> additionalParameters = null;
\r
74 testSubject = createTestSubject();
\r
75 testSubject.setAdditionalParameters(additionalParameters);
\r
79 public void testGetAlertAction() throws Exception {
\r
80 ThresholdCrossingAlertFields testSubject;
\r
85 testSubject = createTestSubject();
\r
86 AlertAction alertAction = AlertAction.CLEAR;
\r
87 testSubject.setAlertAction(alertAction);
\r
88 result = testSubject.getAlertAction();
\r
89 assertEquals(alertAction, result);
\r
93 public void testSetAlertAction() throws Exception {
\r
94 ThresholdCrossingAlertFields testSubject;
\r
95 AlertAction alertAction = AlertAction.CLEAR;
\r
98 testSubject = createTestSubject();
\r
99 testSubject.setAlertAction(alertAction);
\r
103 public void testGetAlertDescription() throws Exception {
\r
104 ThresholdCrossingAlertFields testSubject;
\r
108 testSubject = createTestSubject();
\r
109 result = testSubject.getAlertDescription();
\r
113 public void testSetAlertDescription() throws Exception {
\r
114 ThresholdCrossingAlertFields testSubject;
\r
115 String alertDescription = "";
\r
118 testSubject = createTestSubject();
\r
119 testSubject.setAlertDescription(alertDescription);
\r
123 public void testGetAlertType() throws Exception {
\r
124 ThresholdCrossingAlertFields testSubject;
\r
128 testSubject = createTestSubject();
\r
129 result = testSubject.getAlertType();
\r
133 public void testSetAlertType() throws Exception {
\r
134 ThresholdCrossingAlertFields testSubject;
\r
135 AlertType alertType = AlertType.CARD_ANOMALY;
\r
138 testSubject = createTestSubject();
\r
139 testSubject.setAlertType(alertType);
\r
143 public void testGetAlertValue() throws Exception {
\r
144 ThresholdCrossingAlertFields testSubject;
\r
148 testSubject = createTestSubject();
\r
149 result = testSubject.getAlertValue();
\r
153 public void testSetAlertValue() throws Exception {
\r
154 ThresholdCrossingAlertFields testSubject;
\r
155 String alertValue = "";
\r
158 testSubject = createTestSubject();
\r
159 testSubject.setAlertValue(alertValue);
\r
163 public void testGetAssociatedAlertIdList() throws Exception {
\r
164 ThresholdCrossingAlertFields testSubject;
\r
165 List<String> result;
\r
168 testSubject = createTestSubject();
\r
169 result = testSubject.getAssociatedAlertIdList();
\r
173 public void testSetAssociatedAlertIdList() throws Exception {
\r
174 ThresholdCrossingAlertFields testSubject;
\r
175 List<String> associatedAlertIdList = null;
\r
178 testSubject = createTestSubject();
\r
179 testSubject.setAssociatedAlertIdList(associatedAlertIdList);
\r
183 public void testGetCollectionTimestamp() throws Exception {
\r
184 ThresholdCrossingAlertFields testSubject;
\r
188 testSubject = createTestSubject();
\r
189 result = testSubject.getCollectionTimestamp();
\r
193 public void testSetCollectionTimestamp() throws Exception {
\r
194 ThresholdCrossingAlertFields testSubject;
\r
195 String collectionTimestamp = "";
\r
198 testSubject = createTestSubject();
\r
199 testSubject.setCollectionTimestamp(collectionTimestamp);
\r
203 public void testGetDataCollector() throws Exception {
\r
204 ThresholdCrossingAlertFields testSubject;
\r
208 testSubject = createTestSubject();
\r
209 result = testSubject.getDataCollector();
\r
213 public void testSetDataCollector() throws Exception {
\r
214 ThresholdCrossingAlertFields testSubject;
\r
215 String dataCollector = "";
\r
218 testSubject = createTestSubject();
\r
219 testSubject.setDataCollector(dataCollector);
\r
223 public void testGetElementType() throws Exception {
\r
224 ThresholdCrossingAlertFields testSubject;
\r
228 testSubject = createTestSubject();
\r
229 result = testSubject.getElementType();
\r
233 public void testSetElementType() throws Exception {
\r
234 ThresholdCrossingAlertFields testSubject;
\r
235 String elementType = "";
\r
238 testSubject = createTestSubject();
\r
239 testSubject.setElementType(elementType);
\r
243 public void testGetEventSeverity() throws Exception {
\r
244 ThresholdCrossingAlertFields testSubject;
\r
247 testSubject = createTestSubject();
\r
248 testSubject.setEventSeverity(ThresholdCrossingAlertFields.EventSeverity.MINOR);
\r
249 ThresholdCrossingAlertFields.EventSeverity result = testSubject.getEventSeverity();
\r
250 assertEquals(ThresholdCrossingAlertFields.EventSeverity.MINOR, result);
\r
254 public void testSetEventSeverity() throws Exception {
\r
255 ThresholdCrossingAlertFields testSubject;
\r
256 ThresholdCrossingAlertFields.EventSeverity eventSeverity =
\r
257 ThresholdCrossingAlertFields.EventSeverity.MINOR;
\r
260 testSubject = createTestSubject();
\r
261 testSubject.setEventSeverity(eventSeverity);
\r
265 public void testGetEventStartTimestamp() throws Exception {
\r
266 ThresholdCrossingAlertFields testSubject;
\r
270 testSubject = createTestSubject();
\r
271 testSubject.getEventStartTimestamp();
\r
275 public void testSetEventStartTimestamp() throws Exception {
\r
276 ThresholdCrossingAlertFields testSubject;
\r
277 String eventStartTimestamp = "";
\r
280 testSubject = createTestSubject();
\r
281 testSubject.setEventStartTimestamp(eventStartTimestamp);
\r
285 public void testGetInterfaceName() throws Exception {
\r
286 ThresholdCrossingAlertFields testSubject;
\r
289 testSubject = createTestSubject();
\r
290 testSubject.getInterfaceName();
\r
294 public void testSetInterfaceName() throws Exception {
\r
295 ThresholdCrossingAlertFields testSubject;
\r
296 String interfaceName = "";
\r
299 testSubject = createTestSubject();
\r
300 testSubject.setInterfaceName(interfaceName);
\r
304 public void testGetNetworkService() throws Exception {
\r
305 ThresholdCrossingAlertFields testSubject;
\r
309 testSubject = createTestSubject();
\r
310 result = testSubject.getNetworkService();
\r
314 public void testSetNetworkService() throws Exception {
\r
315 ThresholdCrossingAlertFields testSubject;
\r
316 String networkService = "";
\r
319 testSubject = createTestSubject();
\r
320 testSubject.setNetworkService(networkService);
\r
324 public void testGetPossibleRootCause() throws Exception {
\r
325 ThresholdCrossingAlertFields testSubject;
\r
329 testSubject = createTestSubject();
\r
330 result = testSubject.getPossibleRootCause();
\r
334 public void testSetPossibleRootCause() throws Exception {
\r
335 ThresholdCrossingAlertFields testSubject;
\r
336 String possibleRootCause = "";
\r
339 testSubject = createTestSubject();
\r
340 testSubject.setPossibleRootCause(possibleRootCause);
\r
344 public void testGetThresholdCrossingFieldsVersion() throws Exception {
\r
345 ThresholdCrossingAlertFields testSubject;
\r
346 ThresholdCrossingFieldsVersion result;
\r
349 testSubject = createTestSubject();
\r
350 result = testSubject.getThresholdCrossingFieldsVersion();
\r
354 public void testSetThresholdCrossingFieldsVersion() throws Exception {
\r
355 ThresholdCrossingAlertFields testSubject;
\r
356 ThresholdCrossingFieldsVersion thresholdCrossingFieldsVersion = null;
\r
359 testSubject = createTestSubject();
\r
360 testSubject.setThresholdCrossingFieldsVersion(thresholdCrossingFieldsVersion);
\r
364 public void testToString() throws Exception {
\r
365 ThresholdCrossingAlertFields testSubject;
\r
369 testSubject = createTestSubject();
\r
370 result = testSubject.toString();
\r
374 public void testHashCode() throws Exception {
\r
375 ThresholdCrossingAlertFields testSubject;
\r
379 testSubject = createTestSubject();
\r
380 result = testSubject.hashCode();
\r
384 public void testEquals() throws Exception {
\r
385 ThresholdCrossingAlertFields testSubject;
\r
386 ThresholdCrossingAlertFields testSubject2;
\r
387 Object other = null;
\r
391 testSubject = createTestSubject();
\r
392 testSubject2 = createTestSubject();
\r
393 result = testSubject.equals(other);
\r
394 result = testSubject.equals(testSubject);
\r
395 result = testSubject.equals(testSubject2);
\r
396 assertNotNull(result);
\r