2 * Scaffolding file used to store all the setups needed to run
3 * tests automatically generated by EvoSuite
4 * Mon Nov 14 08:19:44 GMT 2016
7 package org.openecomp.mso.db.catalog.beans;
9 import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
10 import org.junit.BeforeClass;
11 import org.junit.Before;
12 import org.junit.After;
13 import org.junit.AfterClass;
14 import org.evosuite.runtime.sandbox.Sandbox;
17 public class ServiceESTestscaffolding {
20 public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
22 private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
24 private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
27 public static void initEvoSuiteFramework() {
28 org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.Service";
29 org.evosuite.runtime.GuiSupport.initialize();
30 org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
31 org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
32 org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
33 org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
34 org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
35 org.evosuite.runtime.classhandling.JDKClassResetter.init();
37 org.evosuite.runtime.Runtime.getInstance().resetRuntime();
41 public static void clearEvoSuiteFramework(){
42 Sandbox.resetDefaultSecurityManager();
43 java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
47 public void initTestCase(){
48 threadStopper.storeCurrentThreads();
49 threadStopper.startRecordingTime();
50 org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
51 org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
53 org.evosuite.runtime.GuiSupport.setHeadless();
54 org.evosuite.runtime.Runtime.getInstance().resetRuntime();
55 org.evosuite.runtime.agent.InstrumentingAgent.activate();
59 public void doneWithTestCase(){
60 threadStopper.killAndJoinClientThreads();
61 org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
62 org.evosuite.runtime.classhandling.JDKClassResetter.reset();
64 org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
65 org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
66 org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
70 private static void initializeClasses() {
71 org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceESTestscaffolding.class.getClassLoader() ,
72 "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
73 "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
74 "org.openecomp.mso.db.catalog.beans.Service"
78 private static void resetClasses() {