[
https://issues.apache.org/jira/browse/TIKA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527719
]
Bertrand Delacretaz commented on TIKA-10:
-----------------------------------------
Note that while working on TIKA-19 I have removed all the catch statements in
TestParsers, tests now look like:
public void testHTMLExtraction() throws Exception {
Parser parser = ParserFactory.getParser(getTestFile("testHTML.html"),
tc);
assertEquals("Title : Test Indexation Html",
(parser.getContent("title")).getValue());
assertEquals("text/html",parser.getMimeType());
}
I don't think it is useful to catch and log unexpected Exceptions in test
cases: letting the test function throw them makes the tests fail more loudly
and simplifies the test code.
> Remove MimeInfoException catch clauses and import from TestParsers.
> -------------------------------------------------------------------
>
> Key: TIKA-10
> URL: https://issues.apache.org/jira/browse/TIKA-10
> Project: Tika
> Issue Type: Bug
> Reporter: Keith R. Bennett
> Assignee: Sami Siren
> Fix For: 0.1-incubator
>
> Attachments: tika_10.patch
>
>
> Several methods in the TestParsers class include catch clauses for
> MimeInfoException. However, they are unnecessary, and the exception class is
> not available at compile time. Therefore, they should be removed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.