[jbosstools-dev] Unit Test Question
Denis Golovin
dgolovin at exadel.com
Thu Jun 11 14:15:56 EDT 2009
I believe you just need to remove catch block and exception will be in
test results.
or use this class from org.jboss.tools.test plugin
package org.jboss.tools.test.util;
import java.io.PrintWriter;
import java.io.StringWriter;
import junit.framework.TestCase;
/**
* @author eskimo
*
*/
public class JUnitUtils {
public static void fail(String message,Exception e) {
StringWriter out = new StringWriter();
out.append(message).append('\n');
e.printStackTrace(new PrintWriter(out));
TestCase.fail(out.getBuffer().toString());
}
}
Max Rydahl Andersen wrote:
>
>> Anyone have any ideas how I can modify this test case to allow the
>> details of the CoreException's status object to be seen somewhere in
>> the test failure page?
> try {
> <whatever code is there>
> } catch(Exception e) {
> fail("<whatever string you want to show up in output");
> }
>
> /max
> _______________________________________________
> jbosstools-dev mailing list
> jbosstools-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosstools-dev
More information about the jbosstools-dev
mailing list