2 * Scaffolding file used to store all the setups needed to run
\r
3 * tests automatically generated by EvoSuite
\r
4 * Mon Nov 14 13:47:07 GMT 2016
\r
7 package org.openecomp.camunda.bpmn.plugin.urnmap.db;
\r
9 import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
\r
10 import org.junit.BeforeClass;
\r
11 import org.junit.Before;
\r
12 import org.junit.After;
\r
13 import org.junit.AfterClass;
\r
14 import org.evosuite.runtime.sandbox.Sandbox;
\r
16 @EvoSuiteClassExclude
\r
17 public class URNServiceESTestscaffolding {
\r
20 public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
\r
22 private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
\r
24 private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
\r
27 public static void initEvoSuiteFramework() {
\r
28 org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService";
\r
29 org.evosuite.runtime.GuiSupport.initialize();
\r
30 org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
\r
31 org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
\r
32 org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
\r
33 org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
\r
34 org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
\r
35 org.evosuite.runtime.classhandling.JDKClassResetter.init();
\r
36 initializeClasses();
\r
37 org.evosuite.runtime.Runtime.getInstance().resetRuntime();
\r
41 public static void clearEvoSuiteFramework(){
\r
42 Sandbox.resetDefaultSecurityManager();
\r
43 java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
\r
47 public void initTestCase(){
\r
48 threadStopper.storeCurrentThreads();
\r
49 threadStopper.startRecordingTime();
\r
50 org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
\r
51 org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
\r
53 org.evosuite.runtime.GuiSupport.setHeadless();
\r
54 org.evosuite.runtime.Runtime.getInstance().resetRuntime();
\r
55 org.evosuite.runtime.agent.InstrumentingAgent.activate();
\r
59 public void doneWithTestCase(){
\r
60 threadStopper.killAndJoinClientThreads();
\r
61 org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
\r
62 org.evosuite.runtime.classhandling.JDKClassResetter.reset();
\r
64 org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
\r
65 org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
\r
66 org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
\r
70 private static void initializeClasses() {
\r
71 org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNServiceESTestscaffolding.class.getClassLoader() ,
\r
72 "org.camunda.bpm.engine.ProcessEngineException",
\r
73 "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService",
\r
74 "org.camunda.bpm.engine.impl.interceptor.Command",
\r
75 "org.camunda.bpm.engine.ClassLoadingException",
\r
76 "org.camunda.bpm.engine.ProcessEngine",
\r
77 "org.camunda.bpm.engine.ProcessEngines",
\r
78 "org.camunda.bpm.engine.ProcessEngineInfo",
\r
79 "org.camunda.bpm.application.ProcessApplicationUnavailableException",
\r
80 "org.camunda.bpm.engine.impl.ProcessEngineImpl",
\r
81 "org.camunda.bpm.engine.impl.context.Context",
\r
82 "org.camunda.bpm.engine.impl.util.ReflectUtil",
\r
83 "org.camunda.bpm.engine.ProcessEngineServices",
\r
84 "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData"
\r
88 private static void resetClasses() {
\r
89 org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNServiceESTestscaffolding.class.getClassLoader());
\r
91 org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
\r
92 "org.camunda.bpm.engine.impl.context.Context",
\r
93 "org.camunda.bpm.engine.ProcessEngines",
\r
94 "org.camunda.bpm.engine.impl.util.ReflectUtil"
\r