2 * Scaffolding file used to store all the setups needed to run
3 * tests automatically generated by EvoSuite
4 * Mon Nov 14 09:06:06 GMT 2016
7 package org.openecomp.mso.logger;
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 MsoLogInitializerESTestscaffolding {
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.logger.MsoLogInitializer";
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(MsoLogInitializerESTestscaffolding.class.getClassLoader() ,
72 "org.openecomp.mso.logger.MsoLogger",
73 "org.openecomp.mso.logger.MessageEnum",
74 "com.att.eelf.i18n.EELFResolvableErrorEnum",
75 "org.openecomp.mso.logger.MsoLogger$ResponseCode",
76 "org.openecomp.mso.entity.MsoRequest",
77 "org.openecomp.mso.logger.MsoLogger$StatusCode",
78 "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
79 "com.att.eelf.configuration.EELFManager",
80 "org.openecomp.mso.logger.MsoLogger$ErrorCode",
81 "com.att.eelf.configuration.EELFLogger",
82 "com.att.eelf.i18n.EELFMsgs",
83 "com.att.eelf.configuration.EELFLogger$Level",
84 "org.openecomp.mso.logger.MsoLogger$Catalog",
85 "com.att.eelf.configuration.SLF4jWrapper",
86 "org.openecomp.mso.logger.MsoLogInitializer",
87 "com.att.eelf.i18n.EELFResourceManager"
91 private static void resetClasses() {
92 org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoLogInitializerESTestscaffolding.class.getClassLoader());
94 org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
95 "com.att.eelf.i18n.EELFResourceManager",
96 "org.openecomp.mso.logger.MessageEnum",
97 "org.openecomp.mso.logger.MsoLogger$Catalog",
98 "org.openecomp.mso.logger.MsoLogInitializer",
99 "org.openecomp.mso.logger.MsoLogger$ErrorCode",
100 "org.openecomp.mso.logger.MsoLogger",
101 "com.att.eelf.i18n.EELFMsgs",
102 "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
103 "org.apache.xerces.jaxp.SAXParserFactoryImpl",
104 "org.apache.xerces.jaxp.SAXParserImpl",
105 "org.apache.xerces.parsers.XMLParser",
106 "org.apache.xerces.parsers.AbstractSAXParser",
107 "org.apache.xerces.parsers.SAXParser",
108 "org.apache.xerces.parsers.ObjectFactory",
109 "org.apache.xerces.util.ParserConfigurationSettings",
110 "org.apache.xerces.parsers.XML11Configuration",
111 "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
112 "org.apache.xerces.util.SymbolTable",
113 "org.apache.xerces.impl.XMLEntityManager",
114 "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
115 "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
116 "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
117 "org.apache.xerces.impl.XMLEntityScanner$1",
118 "org.apache.xerces.impl.XMLEntityScanner",
119 "org.apache.xerces.impl.XMLErrorReporter",
120 "org.apache.xerces.impl.XMLScanner",
121 "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
122 "org.apache.xerces.impl.XMLDocumentScannerImpl",
123 "org.apache.xerces.util.XMLStringBuffer",
124 "org.apache.xerces.util.XMLAttributesImpl",
125 "org.apache.xerces.impl.XMLDTDScannerImpl",
126 "org.apache.xerces.impl.dtd.XMLDTDProcessor",
127 "org.apache.xerces.impl.dtd.XMLDTDValidator",
128 "org.apache.xerces.impl.validation.ValidationState",
129 "org.apache.xerces.impl.dtd.XMLElementDecl",
130 "org.apache.xerces.impl.dtd.XMLSimpleType",
131 "org.apache.xerces.impl.dv.DTDDVFactory",
132 "org.apache.xerces.impl.dv.ObjectFactory",
133 "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
134 "org.apache.xerces.impl.XMLVersionDetector",
135 "org.apache.xerces.impl.msg.XMLMessageFormatter",
136 "org.apache.xerces.impl.io.UTF8Reader",
137 "org.apache.xerces.util.XMLSymbols",
138 "org.apache.xerces.xni.NamespaceContext",
139 "org.apache.xerces.util.XMLChar",
140 "org.apache.xerces.impl.Constants",
141 "com.att.eelf.configuration.EELFLogger$Level",
142 "com.att.eelf.configuration.EELFManager"