Initial OpenECOMP MSO commit
[so.git] / bpmn / MSOURN-plugin / src / test / java / com / att / camunda / bpm / plugin / urnmap / resources / URNMapPluginRootResourceESTestscaffolding.java
1 /**
2  * Scaffolding file used to store all the setups needed to run 
3  * tests automatically generated by EvoSuite
4  * Mon Nov 14 13:48:27 GMT 2016
5  */
6
7 package com.att.camunda.bpm.plugin.urnmap.resources;
8
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;
15
16 @EvoSuiteClassExclude
17 public class URNMapPluginRootResourceESTestscaffolding {
18
19   @org.junit.Rule 
20   public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
21
22   private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
23
24   private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
25
26   @BeforeClass 
27   public static void initEvoSuiteFramework() { 
28     org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource"; 
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(); 
36     initializeClasses();
37     org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
38   } 
39
40   @AfterClass 
41   public static void clearEvoSuiteFramework(){ 
42     Sandbox.resetDefaultSecurityManager(); 
43     java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
44   } 
45
46   @Before 
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(); 
52      
53     org.evosuite.runtime.GuiSupport.setHeadless(); 
54     org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
55     org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
56   } 
57
58   @After 
59   public void doneWithTestCase(){ 
60     threadStopper.killAndJoinClientThreads();
61     org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
62     org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
63     resetClasses(); 
64     org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
65     org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
66     org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
67   } 
68
69
70   private static void initializeClasses() {
71     org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader() ,
72       "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
73       "org.camunda.bpm.webapp.plugin.spi.AppPlugin",
74       "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
75       "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
76       "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource",
77       "org.openecomp.mso.logger.MsoLogger$ErrorCode",
78       "org.camunda.bpm.cockpit.Cockpit",
79       "com.att.eelf.configuration.EELFLogger",
80       "org.camunda.bpm.engine.rest.exception.RestException",
81       "com.att.eelf.configuration.SLF4jWrapper",
82       "com.att.eelf.i18n.EELFResourceManager",
83       "com.att.camunda.bpm.plugin.urnmap.db.URNData",
84       "org.openecomp.mso.logger.MsoLogger",
85       "org.openecomp.mso.logger.MessageEnum",
86       "com.att.eelf.i18n.EELFResolvableErrorEnum",
87       "org.openecomp.mso.logger.MsoLogger$ResponseCode",
88       "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource",
89       "org.openecomp.mso.entity.MsoRequest",
90       "org.camunda.bpm.webapp.AppRuntimeDelegate",
91       "org.openecomp.mso.logger.MsoLogger$StatusCode",
92       "com.att.eelf.configuration.EELFManager",
93       "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource",
94       "com.att.eelf.i18n.EELFMsgs",
95       "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource",
96       "com.att.eelf.configuration.EELFLogger$Level",
97       "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
98       "org.openecomp.mso.logger.MsoLogger$Catalog"
99     );
100   } 
101
102   private static void resetClasses() {
103     org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader());
104
105     org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
106       "org.camunda.bpm.cockpit.Cockpit",
107       "org.openecomp.mso.logger.MsoLogger$Catalog",
108       "org.openecomp.mso.logger.MsoLogger",
109       "com.att.eelf.i18n.EELFResourceManager",
110       "com.att.eelf.i18n.EELFMsgs",
111       "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
112       "com.att.eelf.configuration.EELFLogger$Level",
113       "com.att.eelf.configuration.EELFManager",
114       "org.openecomp.mso.logger.MessageEnum",
115       "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
116       "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource"
117     );
118   }
119 }