summaryrefslogtreecommitdiffstats
path: root/bpmn/MSORESTClient/src
diff options
context:
space:
mode:
authorArthur Martella <amartell@research.att.com>2017-09-08 13:27:46 -0400
committerArthur Martella <amartell@research.att.com>2017-09-08 13:32:24 -0400
commit62cd6aaaf74aa91ee0037c0e155c8e7284f07567 (patch)
tree68c0c53c9156f5aa3c6b3599ac940770f986633d /bpmn/MSORESTClient/src
parentfa1a211d28a912892fcd888569df033900eb01ee (diff)
1710 Rebase - Second Attempt
This commit rebases changes from openecomp-mso/internal-staging-1710 up to and including this codecloud commit: 54483fc6606ddb1591a2e9da61bff8712325f924 Wed Sep 6 18:12:56 2017 -0400 Rebasing was done on a branch on top of this commit in so/master in ONAP: 93fbdfbe46104f8859d4754040f979cb7997c157 Thu Sep 7 16:42:59 2017 +0000 Change-Id: I4ad9abf40da32bf5bdca43e868b8fa2dbcd9dc59 Issue-id: SO-107 Signed-off-by: Arthur Martella <amartell@research.att.com>
Diffstat (limited to 'bpmn/MSORESTClient/src')
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java237
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java160
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java99
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java98
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java130
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java98
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java98
-rw-r--r--bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java103
8 files changed, 0 insertions, 1023 deletions
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
deleted file mode 100644
index e44a44d118..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:46:25 GMT 2016
- */
-
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.MockitoExtension.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import java.util.Locale;
-import org.apache.http.HttpResponse;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.ReasonPhraseCatalog;
-import org.apache.http.StatusLine;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.EnglishReasonPhraseCatalog;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.message.BasicStatusLine;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class APIResponseESTest extends APIResponseESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "Uc");
- basicHttpResponse0.addHeader("Uc", "org.apache.http.entity.ContentType");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- assertEquals(0, aPIResponse0.getStatusCode());
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- int int0 = aPIResponse0.getStatusCode();
- assertEquals(1471, int0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- ProtocolVersion protocolVersion0 = mock(ProtocolVersion.class, new ViolatedAssumptionAnswer());
- StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
- doReturn(protocolVersion0).when(statusLine0).getProtocolVersion();
- doReturn("Gi|Heay:?O.-PvSJFp").when(statusLine0).getReasonPhrase();
- doReturn((-1730834464), (-1730834464)).when(statusLine0).getStatusCode();
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse(statusLine0);
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- int int0 = aPIResponse0.getStatusCode();
- assertEquals((-1730834464), int0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
- byte[] byteArray0 = new byte[3];
- ByteArrayEntity byteArrayEntity0 = new ByteArrayEntity(byteArray0);
- basicHttpResponse0.setEntity(byteArrayEntity0);
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- byte[] byteArray1 = aPIResponse0.getResponseBodyAsByteArray();
- assertFalse(byteArray1.equals((Object)byteArray0));
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- ProtocolVersion protocolVersion0 = new ProtocolVersion("", 548, 548);
- BasicStatusLine basicStatusLine0 = new BasicStatusLine(protocolVersion0, 1196, " len: ");
- EnglishReasonPhraseCatalog englishReasonPhraseCatalog0 = EnglishReasonPhraseCatalog.INSTANCE;
- Locale locale0 = Locale.ITALY;
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((StatusLine) basicStatusLine0, (ReasonPhraseCatalog) englishReasonPhraseCatalog0, locale0);
- StringEntity stringEntity0 = new StringEntity("");
- basicHttpResponse0.setEntity(stringEntity0);
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- byte[] byteArray0 = aPIResponse0.getResponseBodyAsByteArray();
- assertArrayEquals(new byte[] {}, byteArray0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "'");
- basicHttpResponse0.addHeader("'", "'");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- String string0 = aPIResponse0.getFirstHeader("'");
- assertEquals("'", string0);
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- APIResponse aPIResponse0 = null;
- try {
- aPIResponse0 = new APIResponse((HttpResponse) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.rest.APIResponse", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- ProtocolVersion protocolVersion0 = new ProtocolVersion("=", 1, 2);
- BasicStatusLine basicStatusLine0 = new BasicStatusLine(protocolVersion0, 1, "=");
- EnglishReasonPhraseCatalog englishReasonPhraseCatalog0 = EnglishReasonPhraseCatalog.INSTANCE;
- Locale locale0 = Locale.UK;
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((StatusLine) basicStatusLine0, (ReasonPhraseCatalog) englishReasonPhraseCatalog0, locale0);
- basicHttpResponse0.setStatusLine(protocolVersion0, 1);
- APIResponse aPIResponse0 = null;
- try {
- aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Unknown category for status code 1
- //
- verifyException("org.apache.http.util.Args", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
- basicHttpResponse0.addHeader("", "");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- String string0 = aPIResponse0.getFirstHeader(",n6_`^Oyzn6YprnX");
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
- basicHttpResponse0.addHeader("", "");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- String string0 = aPIResponse0.getFirstHeader("");
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
- basicHttpResponse0.addHeader("", "");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- HttpHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
- assertNotNull(httpHeaderArray0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- HttpHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
- assertNotNull(httpHeaderArray0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "c");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- String string0 = aPIResponse0.getResponseBodyAsString();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
- byte[] byteArray0 = new byte[3];
- ByteArrayEntity byteArrayEntity0 = new ByteArrayEntity(byteArray0);
- basicHttpResponse0.setEntity(byteArrayEntity0);
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- String string0 = aPIResponse0.getResponseBodyAsString();
- assertEquals("\u0000\u0000\u0000", string0);
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "c");
- basicHttpResponse0.addHeader("c", "c");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- aPIResponse0.getResponseBodyAsString();
- basicHttpResponse0.getStatusLine();
- aPIResponse0.getStatusCode();
- HttpHeader[] httpHeaderArray0 = new HttpHeader[2];
- HttpHeader httpHeader0 = mock(HttpHeader.class, new ViolatedAssumptionAnswer());
- doReturn((String) null).when(httpHeader0).getName();
- httpHeaderArray0[0] = httpHeader0;
- HttpHeader httpHeader1 = mock(HttpHeader.class, new ViolatedAssumptionAnswer());
- httpHeaderArray0[1] = httpHeader1;
- PrivateAccess.setVariable((Class<APIResponse>) APIResponse.class, aPIResponse0, "headers", (Object) httpHeaderArray0);
- // Undeclared exception!
- try {
- aPIResponse0.getFirstHeader("");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test15() throws Throwable {
- BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
- APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
- byte[] byteArray0 = aPIResponse0.getResponseBodyAsByteArray();
- assertNull(byteArray0);
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java
deleted file mode 100644
index 80915d74cf..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:46:25 GMT 2016
- */
-
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class APIResponseESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.APIResponse";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(APIResponseESTestscaffolding.class.getClassLoader() ,
- "org.apache.http.HttpVersion",
- "org.apache.http.message.BasicNameValuePair",
- "org.apache.http.message.HeaderGroup",
- "org.apache.http.message.HeaderValueParser",
- "org.apache.http.message.BasicStatusLine",
- "org.apache.http.message.BasicHeaderValueParser",
- "org.apache.http.message.BasicLineFormatter",
- "org.apache.http.entity.ByteArrayEntity",
- "org.apache.http.Header",
- "org.apache.http.StatusLine",
- "org.apache.http.util.EntityUtils",
- "org.apache.http.message.BasicHttpResponse",
- "org.apache.http.FormattedHeader",
- "org.apache.http.RequestLine",
- "org.apache.http.HttpMessage",
- "org.apache.http.message.AbstractHttpMessage",
- "org.apache.http.Consts",
- "org.apache.http.protocol.HTTP",
- "org.apache.http.util.ByteArrayBuffer",
- "org.apache.http.ParseException",
- "org.apache.http.HeaderIterator",
- "org.apache.http.entity.AbstractHttpEntity",
- "org.openecomp.mso.rest.RESTException",
- "org.apache.http.util.Args",
- "org.apache.http.ReasonPhraseCatalog",
- "org.apache.http.HttpEntity",
- "org.apache.http.entity.ContentType",
- "org.apache.http.message.LineFormatter",
- "org.apache.http.entity.StringEntity",
- "org.openecomp.mso.rest.HttpHeader",
- "org.apache.http.HeaderElement",
- "org.apache.http.message.BufferedHeader",
- "org.openecomp.mso.rest.APIResponse",
- "org.apache.http.util.CharArrayBuffer",
- "org.apache.http.ProtocolVersion",
- "org.apache.http.util.TextUtils",
- "org.apache.http.impl.EnglishReasonPhraseCatalog",
- "org.apache.http.params.HttpParams",
- "org.apache.http.message.BasicHeader",
- "org.apache.http.HttpResponse",
- "org.apache.http.NameValuePair",
- "org.apache.http.message.ParserCursor"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(APIResponseESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.apache.http.message.HeaderGroup",
- "org.apache.http.ProtocolVersion",
- "org.apache.http.message.BasicStatusLine",
- "org.apache.http.message.BasicLineFormatter",
- "org.apache.http.util.CharArrayBuffer",
- "org.apache.http.HttpVersion",
- "org.apache.http.impl.EnglishReasonPhraseCatalog",
- "org.apache.http.message.BasicHeader",
- "org.apache.http.message.BasicHeaderValueParser",
- "org.apache.http.Consts",
- "org.apache.http.protocol.HTTP",
- "org.apache.http.message.BasicNameValuePair",
- "org.apache.http.message.BufferedHeader",
- "org.apache.http.ParseException",
- "org.apache.http.entity.AbstractHttpEntity",
- "org.apache.http.util.ByteArrayBuffer",
- "org.apache.http.entity.ContentType"
- );
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
deleted file mode 100644
index f0aeee0f99..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:47:07 GMT 2016
- */
-
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class HttpHeaderESTest extends HttpHeaderESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- HttpHeader httpHeader0 = new HttpHeader("Fw", "WD#>QF/v6_|_A");
- String string0 = httpHeader0.getValue();
- assertEquals("WD#>QF/v6_|_A", string0);
- assertEquals("Fw", httpHeader0.getName());
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- HttpHeader httpHeader0 = new HttpHeader("", "");
- String string0 = httpHeader0.getValue();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- HttpHeader httpHeader0 = new HttpHeader("Nae may no be null.", "Nae may no be null.");
- PrivateAccess.setVariable((Class<HttpHeader>) HttpHeader.class, httpHeader0, "name", (Object) null);
- String string0 = httpHeader0.getName();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- HttpHeader httpHeader0 = new HttpHeader("", "EIqJp");
- String string0 = httpHeader0.getName();
- assertEquals("EIqJp", httpHeader0.getValue());
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- HttpHeader httpHeader0 = null;
- try {
- httpHeader0 = new HttpHeader((String) null, (String) null);
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Name may not be null.
- //
- verifyException("org.openecomp.mso.rest.HttpHeader", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- HttpHeader httpHeader0 = new HttpHeader("Nae may no be null.", "Nae may no be null.");
- String string0 = httpHeader0.getName();
- assertEquals("Nae may no be null.", string0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- HttpHeader httpHeader0 = new HttpHeader("|SJ`pSz:BCB1o8~", (String) null);
- String string0 = httpHeader0.getValue();
- assertNull(string0);
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
deleted file mode 100644
index 0438c1fba6..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:47:07 GMT 2016
- */
-
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class HttpHeaderESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.HttpHeader";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HttpHeaderESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.rest.HttpHeader"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java
deleted file mode 100644
index bb7460dfc6..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:47:42 GMT 2016
- */
-
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class RESTConfigESTest extends RESTConfigESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig((String) null, "", (-3449));
- String string0 = rESTConfig0.getURL();
- assertEquals(-3449, rESTConfig0.getProxyPort());
- assertNull(string0);
- assertFalse(rESTConfig0.trustAllCerts());
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig(";A,GC~!-_.>+R=>rIO", "", (-3449), false);
- String string0 = rESTConfig0.getURL();
- assertEquals("", rESTConfig0.getProxyHost());
- assertEquals(-3449, rESTConfig0.getProxyPort());
- assertFalse(rESTConfig0.trustAllCerts());
- assertEquals(";A,GC~!-_.>+R=>rIO", string0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("", "", 0);
- int int0 = rESTConfig0.getProxyPort();
- assertFalse(rESTConfig0.trustAllCerts());
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig((String) null);
- int int0 = rESTConfig0.getProxyPort();
- assertEquals((-1), int0);
- assertFalse(rESTConfig0.trustAllCerts());
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig((String) null, "zZu8", (-1933), true);
- String string0 = rESTConfig0.getProxyHost();
- assertEquals(-1933, rESTConfig0.getProxyPort());
- assertTrue(rESTConfig0.trustAllCerts());
- assertNotNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
- boolean boolean0 = rESTConfig0.trustAllCerts();
- assertTrue(boolean0);
- assertEquals(2708, rESTConfig0.getProxyPort());
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
- rESTConfig0.getURL();
- assertTrue(rESTConfig0.trustAllCerts());
- assertEquals(2708, rESTConfig0.getProxyPort());
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("", true);
- String string0 = rESTConfig0.getProxyHost();
- assertTrue(rESTConfig0.trustAllCerts());
- assertNull(string0);
- assertEquals(-1, rESTConfig0.getProxyPort());
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
- int int0 = rESTConfig0.getProxyPort();
- assertEquals(2708, int0);
- assertTrue(rESTConfig0.trustAllCerts());
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
- rESTConfig0.getProxyHost();
- assertEquals(2708, rESTConfig0.getProxyPort());
- assertTrue(rESTConfig0.trustAllCerts());
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- RESTConfig rESTConfig0 = new RESTConfig("");
- boolean boolean0 = rESTConfig0.trustAllCerts();
- assertEquals(-1, rESTConfig0.getProxyPort());
- assertFalse(boolean0);
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java
deleted file mode 100644
index 1fabc6bc5d..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:47:42 GMT 2016
- */
-
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class RESTConfigESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.RESTConfig";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RESTConfigESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.rest.RESTConfig"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java
deleted file mode 100644
index e4ac23b3bd..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:47:59 GMT 2016
- */
-
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.mock.java.lang.MockThrowable;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class RESTExceptionESTest extends RESTExceptionESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- RESTException rESTException0 = new RESTException(0, (String) null);
- int int0 = rESTException0.getStatusCode();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- RESTException rESTException0 = new RESTException(1619, "");
- int int0 = rESTException0.getStatusCode();
- assertEquals(1619, int0);
- }
-
- @Test(timeout = 4000)
- public void test2() throws Throwable {
- RESTException rESTException0 = new RESTException("");
- String string0 = rESTException0.getErrorMessage();
- assertEquals("", string0);
- }
-
- @Test(timeout = 4000)
- public void test3() throws Throwable {
- RESTException rESTException0 = null;
- try {
- rESTException0 = new RESTException((Throwable) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.rest.RESTException", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test4() throws Throwable {
- RESTException rESTException0 = new RESTException((-489), "org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable");
- String string0 = rESTException0.getErrorMessage();
- assertEquals("org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable", string0);
- }
-
- @Test(timeout = 4000)
- public void test5() throws Throwable {
- MockThrowable mockThrowable0 = new MockThrowable();
- RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
- int int0 = rESTException0.getStatusCode();
- assertEquals((-1), int0);
- }
-
- @Test(timeout = 4000)
- public void test6() throws Throwable {
- MockThrowable mockThrowable0 = new MockThrowable();
- RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
- String string0 = rESTException0.getErrorMessage();
- assertNull(string0);
- }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java
deleted file mode 100644
index 3e3c9873b7..0000000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:47:59 GMT 2016
- */
-
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class RESTExceptionESTestscaffolding {
-
- @org.junit.Rule
- public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
- private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
-
- private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
- @BeforeClass
- public static void initEvoSuiteFramework() {
- org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.RESTException";
- org.evosuite.runtime.GuiSupport.initialize();
- org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
- org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
- org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
- org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
- org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
- org.evosuite.runtime.classhandling.JDKClassResetter.init();
- initializeClasses();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- }
-
- @AfterClass
- public static void clearEvoSuiteFramework(){
- Sandbox.resetDefaultSecurityManager();
- java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
- }
-
- @Before
- public void initTestCase(){
- threadStopper.storeCurrentThreads();
- threadStopper.startRecordingTime();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
- org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
-
- org.evosuite.runtime.GuiSupport.setHeadless();
- org.evosuite.runtime.Runtime.getInstance().resetRuntime();
- org.evosuite.runtime.agent.InstrumentingAgent.activate();
- }
-
- @After
- public void doneWithTestCase(){
- threadStopper.killAndJoinClientThreads();
- org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
- org.evosuite.runtime.classhandling.JDKClassResetter.reset();
- resetClasses();
- org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
- org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
- org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
- }
-
-
- private static void initializeClasses() {
- org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RESTExceptionESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.rest.RESTException"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RESTExceptionESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.rest.RESTException"
- );
- }
-}