aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org/openecomp/mso/utils
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/test/java/org/openecomp/mso/utils')
-rw-r--r--common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java124
-rw-r--r--common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java79
-rw-r--r--common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java177
-rw-r--r--common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java83
-rw-r--r--common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java34
-rw-r--r--common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java94
6 files changed, 0 insertions, 591 deletions
diff --git a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java b/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java
deleted file mode 100644
index 212fe95407..0000000000
--- a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:02:57 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import java.util.List;
-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 CheckResultsESTest extends CheckResultsESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- CheckResults checkResults0 = new CheckResults();
- checkResults0.addHostCheckResult("GP<QUZyf\"vf-sD", (-1), "");
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- CheckResults checkResults0 = new CheckResults();
- PrivateAccess.setVariable((Class<CheckResults>) CheckResults.class, checkResults0, "results", (Object) null);
- List<CheckResults.CheckResult> list0 = checkResults0.getResults();
- assertNull(list0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- checkResults_CheckResult0.setOutput("xp");
- assertEquals(0, checkResults_CheckResult0.getState());
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- checkResults_CheckResult0.setType("2");
- assertEquals(0, checkResults_CheckResult0.getState());
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- checkResults_CheckResult0.setState(1);
- assertEquals(1, checkResults_CheckResult0.getState());
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- checkResults_CheckResult0.setServicename("9~");
- assertEquals(0, checkResults_CheckResult0.getState());
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- checkResults_CheckResult0.setHostname((String) null);
- assertNull(checkResults_CheckResult0.getServicename());
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- CheckResults checkResults0 = new CheckResults();
- checkResults0.addHostCheckResult("GP<QUZyf\"vf-sD", 0, "GP<QUZyf\"vf-sD");
- List<CheckResults.CheckResult> list0 = checkResults0.getResults();
- assertEquals(1, list0.size());
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- CheckResults checkResults0 = new CheckResults();
- List<CheckResults.CheckResult> list0 = checkResults0.getResults();
- assertTrue(list0.isEmpty());
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- String string0 = checkResults_CheckResult0.getServicename();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- int int0 = checkResults_CheckResult0.getState();
- assertEquals(0, int0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- String string0 = checkResults_CheckResult0.getHostname();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- String string0 = checkResults_CheckResult0.getType();
- assertNull(string0);
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- CheckResults checkResults0 = new CheckResults();
- checkResults0.addServiceCheckResult("", "Ifp73+/", 0, " ");
- }
-
- @Test(timeout = 4000)
- public void test14() throws Throwable {
- CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
- String string0 = checkResults_CheckResult0.getOutput();
- assertNull(string0);
- }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java
deleted file mode 100644
index a4fea268c1..0000000000
--- a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:02:57 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-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 CheckResultsESTestscaffolding {
-
- @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.utils.CheckResults";
- 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(CheckResultsESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.utils.CheckResults$CheckResult",
- "org.openecomp.mso.utils.CheckResults"
- );
- }
-
- private static void resetClasses() {
- }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java b/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
deleted file mode 100644
index 59e8cec92d..0000000000
--- a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:07:10 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import javax.crypto.BadPaddingException;
-import javax.crypto.IllegalBlockSizeException;
-import java.security.InvalidKeyException;
-
-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 CryptoUtilsESTest extends CryptoUtilsESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test00() throws Throwable {
- CryptoUtils.decrypt("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", "00000000000000000000000000000000");
- }
-
- @Test(timeout = 4000)
- public void test01() throws Throwable {
- byte[] byteArray0 = new byte[0];
- CryptoUtils.byteArrayToHexString(byteArray0);
- }
-
- @Test(timeout = 4000)
- public void test02() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.encrypt("AES", "w^p&|^Cvs@K.@@");
- fail("Expecting exception: NumberFormatException");
-
- } catch(NumberFormatException e) {
- //
- // For input string: \"w^\"
- //
- verifyException("java.lang.NumberFormatException", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test03() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.encrypt((String) null, "B2000000000000000000000000000000");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.utils.CryptoUtils", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test04() throws Throwable {
- try {
- CryptoUtils.decrypt("B20000000000000000000000000000000000000000000000", "B20000000000000000000000000000000000000000000000");
- fail("Expecting exception: IllegalBlockSizeException");
-
- } catch(IllegalBlockSizeException | InvalidKeyException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test05() throws Throwable {
- try {
- CryptoUtils.decrypt("0000C200000000000000000000000000", "0000C200000000000000000000000000");
- fail("Expecting exception: BadPaddingException");
-
- } catch(BadPaddingException e) {
- }
- }
-
- @Test(timeout = 4000)
- public void test06() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.decrypt("s.", "s.");
- fail("Expecting exception: NumberFormatException");
-
- } catch(NumberFormatException e) {
- //
- // For input string: \"s.\"
- //
- verifyException("java.lang.NumberFormatException", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test07() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.decrypt("", "");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Empty key
- //
- verifyException("javax.crypto.spec.SecretKeySpec", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test08() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.byteArrayToHexString((byte[]) null);
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.utils.CryptoUtils", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test09() throws Throwable {
- byte[] byteArray0 = new byte[16];
- byteArray0[0] = (byte) (-78);
- String string0 = CryptoUtils.byteArrayToHexString(byteArray0);
- assertEquals("B2000000000000000000000000000000", string0);
- }
-
- @Test(timeout = 4000)
- public void test10() throws Throwable {
- String string0 = CryptoUtils.encrypt("00000000000000000000000000000000", "00000000000000000000000000000000");
- assertEquals("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", string0);
- }
-
- @Test(timeout = 4000)
- public void test11() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.encrypt("", "");
- fail("Expecting exception: IllegalArgumentException");
-
- } catch(IllegalArgumentException e) {
- //
- // Empty key
- //
- verifyException("javax.crypto.spec.SecretKeySpec", e);
- }
- }
-
- @Test(timeout = 4000)
- public void test12() throws Throwable {
- CryptoUtils cryptoUtils0 = new CryptoUtils();
- }
-
- @Test(timeout = 4000)
- public void test13() throws Throwable {
- // Undeclared exception!
- try {
- CryptoUtils.decrypt((String) null, "00000000000000000000000000000000");
- fail("Expecting exception: NullPointerException");
-
- } catch(NullPointerException e) {
- //
- // no message in exception (getMessage() returned null)
- //
- verifyException("org.openecomp.mso.utils.CryptoUtils", e);
- }
- }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java
deleted file mode 100644
index 09574153c7..0000000000
--- a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:07:10 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-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 CryptoUtilsESTestscaffolding {
-
- @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.utils.CryptoUtils";
- 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(CryptoUtilsESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.utils.CryptoUtils"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CryptoUtilsESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "org.openecomp.mso.utils.CryptoUtils"
- );
- }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java b/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java
deleted file mode 100644
index fa8517e3db..0000000000
--- a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:02:03 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-
-import org.openecomp.mso.logger.MsoLogger;
-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 UUIDCheckerESTest extends UUIDCheckerESTestscaffolding {
-
- @Test(timeout = 4000)
- public void test0() throws Throwable {
- MsoLogger msoLogger0 = mock(MsoLogger.class, new ViolatedAssumptionAnswer());
- String string0 = UUIDChecker.generateServiceInstanceID(msoLogger0);
- assertEquals("00000000-0100-4000-8200-000003000000", string0);
- }
-
- @Test(timeout = 4000)
- public void test1() throws Throwable {
- UUIDChecker uUIDChecker0 = (UUIDChecker)PrivateAccess.callDefaultConstructorOfTheClassUnderTest();
- assertNotNull(uUIDChecker0);
- }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java
deleted file mode 100644
index 15397cb165..0000000000
--- a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:02:03 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-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 UUIDCheckerESTestscaffolding {
-
- @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.utils.UUIDChecker";
- 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(UUIDCheckerESTestscaffolding.class.getClassLoader() ,
- "org.openecomp.mso.logger.MsoLogger",
- "org.openecomp.mso.logger.MessageEnum",
- "com.att.eelf.i18n.EELFResolvableErrorEnum",
- "org.openecomp.mso.logger.MsoLogger$ResponseCode",
- "org.openecomp.mso.logger.MsoLogger$Catalog",
- "org.openecomp.mso.entity.MsoRequest",
- "org.openecomp.mso.logger.MsoLogger$StatusCode",
- "com.att.eelf.i18n.EELFResourceManager",
- "org.openecomp.mso.logger.MsoLogger$ErrorCode",
- "org.openecomp.mso.utils.UUIDChecker"
- );
- }
-
- private static void resetClasses() {
- org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UUIDCheckerESTestscaffolding.class.getClassLoader());
-
- org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
- "com.att.eelf.i18n.EELFResourceManager",
- "org.openecomp.mso.logger.MessageEnum",
- "org.openecomp.mso.logger.MsoLogger"
- );
- }
-}