Package org.apache.any23.extractor

Examples of org.apache.any23.extractor.ExtractionException.printStackTrace()


        er.notifyIssue(IssueReport.IssueLevel.Error  , "Fake error."      , 3, 4);
        er.notifyIssue(IssueReport.IssueLevel.Warning, "Fake warning."    , 5, 6);

        ExtractionException ee = new ExtractionException("Fake message.", new RuntimeException("Fake cause"), er);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ee.printStackTrace(new PrintWriter(baos));
        final String bufferContent = baos.toString();
        Assert.assertTrue("Unexpected message content.", bufferContent.contains(FAKE_EXTRACTOR_NAME));
        Assert.assertTrue("Unexpected message content.", bufferContent.contains("http://fake.document.uri"));
        Assert.assertTrue("Unexpected message content.", bufferContent.contains(
            ExtractionContext.ROOT_EXTRACTION_RESULT_ID
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.