Package org.jaxen

Examples of org.jaxen.JaxenException.printStackTrace()


    public void testPrintStackTrace() {
        StringIndexOutOfBoundsException cause = new StringIndexOutOfBoundsException("1234");
        JaxenException ex = new JaxenException(cause);
        StringWriter out = new StringWriter();
        PrintWriter pw = new PrintWriter(out);
        ex.printStackTrace(pw);
        pw.close();
        String trace = out.toString();
        assertEquals(-1, trace.indexOf("Root cause:"));
        assertTrue(trace.indexOf("Caused by: java.lang.StringIndexOutOfBoundsException") > 0);
        assertTrue(trace.indexOf("1234") > 0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.