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