Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
820 changes: 820 additions & 0 deletions .evosuite/best-tests/com/xenoamess/x8l/AbstractTreeNode_ESTest.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Apr 05 20:53:34 GMT 2022
*/

package com.xenoamess.x8l;

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;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;

@EvoSuiteClassExclude
public class AbstractTreeNode_ESTest_scaffolding {

@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 = "com.xenoamess.x8l.AbstractTreeNode";
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();
setSystemProperties();
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();
setSystemProperties();
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();
}

public static void setSystemProperties() {

java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("file.encoding", "GBK");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.io.tmpdir", "C:\\Users\\xenoa\\AppData\\Local\\Temp\\");
java.lang.System.setProperty("user.country", "CN");
java.lang.System.setProperty("user.dir", "F:\\workspace\\x8l");
java.lang.System.setProperty("user.home", "C:\\Users\\xenoa");
java.lang.System.setProperty("user.language", "zh");
java.lang.System.setProperty("user.name", "xenoa");
java.lang.System.setProperty("user.timezone", "");
}

private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AbstractTreeNode_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang3.NotImplementedException",
"com.xenoamess.x8l.dealers.X8lDealer",
"com.xenoamess.x8l.X8lTree",
"com.xenoamess.x8l.databind.x8lpath.X8lPathUtil",
"com.fasterxml.jackson.databind.JsonSerializable$Base",
"org.dom4j.Node",
"com.xenoamess.x8l.ContentNode",
"com.xenoamess.x8l.AbstractTreeNode",
"org.apache.commons.lang3.StringUtils",
"com.xenoamess.x8l.CommentNode",
"com.fasterxml.jackson.databind.node.ObjectNode",
"com.xenoamess.x8l.dealers.LanguageDealer",
"com.xenoamess.x8l.dealers.JsonDealer",
"org.dom4j.DocumentException",
"com.xenoamess.x8l.dealers.XmlDealer$1",
"com.fasterxml.jackson.databind.node.BaseJsonNode",
"com.xenoamess.x8l.AbstractTreeNode$1",
"com.fasterxml.jackson.databind.JsonSerializable",
"com.fasterxml.jackson.databind.node.ContainerNode",
"com.xenoamess.x8l.dealers.XmlDealer$4",
"com.xenoamess.x8l.X8lGrammarException",
"com.fasterxml.jackson.databind.JsonNode",
"com.xenoamess.x8l.dealers.XmlDealer$3",
"com.xenoamess.x8l.dealers.XmlDealer$2",
"com.xenoamess.x8l.databind.X8lDataBeanFieldScheme",
"com.xenoamess.x8l.dealers.X8lDealer$3",
"com.xenoamess.x8l.TextNode",
"com.xenoamess.x8l.dealers.X8lDealer$4",
"com.fasterxml.jackson.core.TreeNode",
"com.xenoamess.x8l.dealers.X8lDealer$1",
"com.xenoamess.x8l.dealers.X8lDealer$2",
"org.dom4j.Branch",
"com.fasterxml.jackson.databind.node.ArrayNode",
"com.xenoamess.x8l.dealers.XmlDealer",
"com.xenoamess.x8l.RootNode",
"com.xenoamess.x8l.dealers.AbstractLanguageDealerHandler",
"com.xenoamess.x8l.dealers.JsonDealer$3",
"com.xenoamess.x8l.dealers.JsonDealer$2",
"com.xenoamess.x8l.dealers.JsonDealer$1",
"com.fasterxml.jackson.databind.node.JsonNodeCreator"
);
}

private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(AbstractTreeNode_ESTest_scaffolding.class.getClassLoader());

org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.xenoamess.x8l.AbstractTreeNode",
"com.xenoamess.x8l.ContentNode",
"com.xenoamess.x8l.dealers.LanguageDealer",
"com.xenoamess.x8l.dealers.X8lDealer$1",
"com.xenoamess.x8l.dealers.X8lDealer$2",
"com.xenoamess.x8l.dealers.X8lDealer$3",
"com.xenoamess.x8l.dealers.X8lDealer$4",
"com.xenoamess.x8l.dealers.X8lDealer",
"com.xenoamess.x8l.databind.X8lDataBeanFieldScheme",
"com.xenoamess.x8l.AbstractTreeNode$1",
"com.xenoamess.x8l.dealers.JsonDealer$1",
"com.xenoamess.x8l.dealers.JsonDealer$2",
"com.xenoamess.x8l.dealers.JsonDealer$3",
"com.xenoamess.x8l.dealers.JsonDealer",
"com.xenoamess.x8l.dealers.XmlDealer$1",
"com.xenoamess.x8l.dealers.XmlDealer$2",
"com.xenoamess.x8l.dealers.XmlDealer$3",
"com.xenoamess.x8l.dealers.XmlDealer$4",
"com.xenoamess.x8l.dealers.XmlDealer",
"com.xenoamess.x8l.databind.x8lpath.X8lPathUtil",
"com.xenoamess.x8l.RootNode",
"com.xenoamess.x8l.X8lTree",
"com.xenoamess.x8l.CommentNode",
"org.apache.commons.lang3.StringUtils",
"com.xenoamess.x8l.TextNode",
"com.xenoamess.x8l.dealers.X8lStatusEnum",
"org.apache.commons.lang3.NotImplementedException",
"com.xenoamess.x8l.X8lGrammarException"
);
}
}
184 changes: 184 additions & 0 deletions .evosuite/best-tests/com/xenoamess/x8l/CommentNode_ESTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
/*
* This file was automatically generated by EvoSuite
* Tue Apr 05 20:55:02 GMT 2022
*/

package com.xenoamess.x8l;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.xenoamess.x8l.CommentNode;
import com.xenoamess.x8l.ContentNode;
import com.xenoamess.x8l.RootNode;
import java.io.Reader;
import java.io.StringReader;
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, separateClassLoader = true, useJEE = true)
public class CommentNode_ESTest extends CommentNode_ESTest_scaffolding {

@Test(timeout = 4000)
public void test00() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null, (-1));
CommentNode commentNode0 = new CommentNode(contentNode0, " ");
StringReader stringReader0 = new StringReader(" ");
contentNode0.read((Reader) stringReader0);
String string0 = commentNode0.getTextContent();
assertNull(string0);
}

@Test(timeout = 4000)
public void test01() throws Throwable {
RootNode rootNode0 = new RootNode((ContentNode) null, 0);
CommentNode commentNode0 = new CommentNode(rootNode0, " ");
String string0 = commentNode0.getTextContent();
assertEquals(" ", string0);
}

@Test(timeout = 4000)
public void test02() throws Throwable {
RootNode rootNode0 = new RootNode((ContentNode) null);
CommentNode commentNode0 = new CommentNode(rootNode0, "");
rootNode0.format(4800);
// Undeclared exception!
commentNode0.show();
}

@Test(timeout = 4000)
public void test03() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null, (-1));
CommentNode commentNode0 = new CommentNode(contentNode0, " ");
StringReader stringReader0 = new StringReader(" ");
contentNode0.read((Reader) stringReader0);
// Undeclared exception!
try {
commentNode0.show();
fail("Expecting exception: IllegalArgumentException");

} catch(IllegalArgumentException e) {
//
// Argument for @NotNull parameter 'originalString' of com/xenoamess/x8l/X8lTree.transcodeComment must not be null
//
verifyException("com.xenoamess.x8l.X8lTree", e);
}
}

@Test(timeout = 4000)
public void test04() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null);
CommentNode commentNode0 = new CommentNode(contentNode0, "");
commentNode0.close();
// Undeclared exception!
try {
commentNode0.equals(commentNode0);
fail("Expecting exception: NullPointerException");

} catch(NullPointerException e) {
}
}

@Test(timeout = 4000)
public void test05() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null, 3335);
RootNode rootNode0 = new RootNode(contentNode0);
CommentNode commentNode0 = null;
try {
commentNode0 = new CommentNode(rootNode0, (-1), "");
fail("Expecting exception: IndexOutOfBoundsException");

} catch(IndexOutOfBoundsException e) {
//
// Index: -1, Size: 0
//
verifyException("java.util.ArrayList", e);
}
}

@Test(timeout = 4000)
public void test06() throws Throwable {
CommentNode commentNode0 = new CommentNode((ContentNode) null, 400, "-azFUdy08x&A9e),EK ");
commentNode0.clear();
// Undeclared exception!
try {
commentNode0.format(0);
fail("Expecting exception: NullPointerException");

} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.xenoamess.x8l.CommentNode", e);
}
}

@Test(timeout = 4000)
public void test07() throws Throwable {
CommentNode commentNode0 = new CommentNode((ContentNode) null, 0, "65lY04:y;cv[V.F_3R");
commentNode0.setTextContent("65lY04:y;cv[V.F_3R");
assertEquals("65lY04:y;cv[V.F_3R", commentNode0.getTextContent());
}

@Test(timeout = 4000)
public void test08() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null);
CommentNode commentNode0 = new CommentNode(contentNode0, "");
String string0 = commentNode0.getTextContent();
assertEquals("", string0);
}

@Test(timeout = 4000)
public void test09() throws Throwable {
RootNode rootNode0 = new RootNode((ContentNode) null);
CommentNode commentNode0 = new CommentNode(rootNode0, "");
boolean boolean0 = commentNode0.equals(rootNode0);
assertFalse(boolean0);
}

@Test(timeout = 4000)
public void test10() throws Throwable {
CommentNode commentNode0 = new CommentNode((ContentNode) null, (String) null);
boolean boolean0 = commentNode0.equals((Object) null);
assertFalse(boolean0);
}

@Test(timeout = 4000)
public void test11() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null);
CommentNode commentNode0 = new CommentNode(contentNode0, "");
boolean boolean0 = commentNode0.equals(commentNode0);
assertTrue(boolean0);
}

@Test(timeout = 4000)
public void test12() throws Throwable {
CommentNode commentNode0 = new CommentNode((ContentNode) null, 21, (String) null);
assertEquals("", commentNode0.getTextContent());
}

@Test(timeout = 4000)
public void test13() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null, (-1));
CommentNode commentNode0 = new CommentNode(contentNode0, " ");
commentNode0.show();
assertEquals(" ", commentNode0.getTextContent());
}

@Test(timeout = 4000)
public void test14() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null, (-1));
CommentNode commentNode0 = new CommentNode(contentNode0, " ");
CommentNode commentNode1 = commentNode0.copy();
assertEquals(" ", commentNode1.getTextContent());
}

@Test(timeout = 4000)
public void test15() throws Throwable {
ContentNode contentNode0 = new ContentNode((ContentNode) null);
CommentNode commentNode0 = new CommentNode(contentNode0, "");
commentNode0.format((-1756));
assertEquals("", commentNode0.getTextContent());
}
}
Loading
Loading