Closed monperrus closed 6 years ago
I'm using linux and I didn't manage to reproduce the exception even by removing the try/catch block.
java -cp ../evocrash-lib/evocrash-1.0.0.jar:../src/test:"$(cat xwikiclasspath.txt)" org.junit.runner.JUnitCore com.xpn.xwiki.objects.classes.BaseClass_ESTest
always work for me.
When I remove the annotation and the try/catch block I got this :
public class BaseClass_ESTest extends BaseClass_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
BaseClass baseClass0 = new BaseClass();
baseClass0.addTextField("^3:mVG", "^3:mVG", (-2692));
TextAreaClass.ContentType textAreaClass_ContentType0 = TextAreaClass.ContentType.WIKI_TEXT;
}
}
Hi! @pderakhshanfar could you take a look at this? @MaelAudren What is the error message (if any)?
I found out the issue I removed the whole try/catch block which contains the lines
baseClass0.addTextAreaField("<>", ",Iqw!OCByZ7G/RC", 0, 0, textAreaClass_ContentType0);
fail("Expecting exception: ClassCastException");
which are responsible for the test failing.
Only try and catch should be removed but not the content as a consequence the final java file should look like:
public class BaseClass_ESTest extends BaseClass_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
BaseClass baseClass0 = new BaseClass();
baseClass0.addDBListField("<>", "<>", 0, false, false, "EeaQ+");
TextAreaClass.ContentType textAreaClass_ContentType0 = TextAreaClass.ContentType.WIKI_TEXT;
baseClass0.addTextAreaField("<>", ",Iqw!OCByZ7G/RC", 0, 0, textAreaClass_ContentType0);
fail("Expecting exception: ClassCastException");
}
}
in order to show that the exception is really reproduced