Merge "updated ARIA version"
[so.git] / bpmn / MSORESTClient / src / test / java / org / openecomp / mso / rest / RESTExceptionESTest.java
1 /*
2  * This file was automatically generated by EvoSuite
3  * Mon Nov 14 11:47:59 GMT 2016
4  */
5
6 /*- 
7  * ============LICENSE_START======================================================= 
8  * OPENECOMP - MSO 
9  * ================================================================================ 
10  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
11  * ================================================================================ 
12  * Licensed under the Apache License, Version 2.0 (the "License"); 
13  * you may not use this file except in compliance with the License. 
14  * You may obtain a copy of the License at 
15  * 
16  *      http://www.apache.org/licenses/LICENSE-2.0 
17  * 
18  * Unless required by applicable law or agreed to in writing, software 
19  * distributed under the License is distributed on an "AS IS" BASIS, 
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
21  * See the License for the specific language governing permissions and 
22  * limitations under the License. 
23  * ============LICENSE_END========================================================= 
24  */ 
25
26 package org.openecomp.mso.rest;
27
28 import org.junit.Test;
29 import static org.junit.Assert.*;
30 import static org.evosuite.runtime.EvoAssertions.*;
31
32 import org.evosuite.runtime.EvoRunner;
33 import org.evosuite.runtime.EvoRunnerParameters;
34 import org.evosuite.runtime.mock.java.lang.MockThrowable;
35 import org.junit.runner.RunWith;
36
37 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
38 public class RESTExceptionESTest extends RESTExceptionESTestscaffolding {
39
40   @Test(timeout = 4000)
41   public void test0()  throws Throwable  {
42       RESTException rESTException0 = new RESTException(0, (String) null);
43       int int0 = rESTException0.getStatusCode();
44       assertEquals(0, int0);
45   }
46
47   @Test(timeout = 4000)
48   public void test1()  throws Throwable  {
49       RESTException rESTException0 = new RESTException(1619, "");
50       int int0 = rESTException0.getStatusCode();
51       assertEquals(1619, int0);
52   }
53
54   @Test(timeout = 4000)
55   public void test2()  throws Throwable  {
56       RESTException rESTException0 = new RESTException("");
57       String string0 = rESTException0.getErrorMessage();
58       assertEquals("", string0);
59   }
60
61   @Test(timeout = 4000)
62   public void test3()  throws Throwable  {
63       RESTException rESTException0 = null;
64       try {
65         rESTException0 = new RESTException((Throwable) null);
66         fail("Expecting exception: NullPointerException");
67       
68       } catch(NullPointerException e) {
69          //
70          // no message in exception (getMessage() returned null)
71          //
72          verifyException("org.openecomp.mso.rest.RESTException", e);
73       }
74   }
75
76   @Test(timeout = 4000)
77   public void test4()  throws Throwable  {
78       RESTException rESTException0 = new RESTException((-489), "org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable");
79       String string0 = rESTException0.getErrorMessage();
80       assertEquals("org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable", string0);
81   }
82
83   @Test(timeout = 4000)
84   public void test5()  throws Throwable  {
85       MockThrowable mockThrowable0 = new MockThrowable();
86       RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
87       int int0 = rESTException0.getStatusCode();
88       assertEquals((-1), int0);
89   }
90
91   @Test(timeout = 4000)
92   public void test6()  throws Throwable  {
93       MockThrowable mockThrowable0 = new MockThrowable();
94       RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
95       String string0 = rESTException0.getErrorMessage();
96       assertNull(string0);
97   }
98 }