Package org.apache.any23
Class Any23Test
- java.lang.Object
-
- org.apache.any23.AbstractAny23TestBase
-
- org.apache.any23.Any23OnlineTestBase
-
- org.apache.any23.Any23Test
-
public class Any23Test extends Any23OnlineTestBase
Test case forAny23facade.- Author:
- Davide Palmisano ( dpalmisano@gmail.com ), Michele Mostarda ( michele.mostarda@gmail.com )
-
-
Field Summary
-
Fields inherited from class org.apache.any23.Any23OnlineTestBase
ONLINE_TEST_DISABLED_FLAG
-
Fields inherited from class org.apache.any23.AbstractAny23TestBase
tempDirectory, testFolder
-
-
Constructor Summary
Constructors Constructor Description Any23Test()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestAbstractMethodErrorIssue186_1()voidtestAbstractMethodErrorIssue186_2()voidtestBlankNodesViaURL()voidtestDemoCodeSnippet1()Tests out the first code snipped used in Developer Manual.voidtestDemoCodeSnippet2()Tests out the second code snipped used in Developer Manual.voidtestExceptionPropagation()voidtestExplicitEncoding()This tests the behavior of Any23 to execute the extraction explicitly specifying the charset encoding of the input.voidtestExtractionParameters()voidtestExtractionParametersWithNestingDisabled()voidtestGZippedContent()This test checks if a URL that is supposed to be GZIPPED is correctly opened and parsed with theAny23facade.voidtestHTMLBruteForceDetection()voidtestImplicitEncoding()This tests the behavior of Any23 to perform the extraction without passing it any charset encoding.voidtestIssue415InvalidNTriples()voidtestIssue415ValidNTriples()voidtestMicrodataSupport()voidtestModifiableConfiguration_issue183()voidtestN3Detection1()voidtestN3Detection2()voidtestNTriplesDetectionAndExtraction()voidtestNturtleDetectionAndExtraction()voidtestProgrammaticExtraction()This test checks the extraction behavior when the library is used programatically.voidtestRDFXMLDetectionAndExtraction()voidtestTTLDetection()voidtestXMLMimeTypeManagement()Test correct management of general XML content.voidtestXMLMimeTypeManagementViaURL()Test correct management of general XML content from URL source.-
Methods inherited from class org.apache.any23.Any23OnlineTestBase
assumeOnlineAllowed
-
Methods inherited from class org.apache.any23.AbstractAny23TestBase
copyResourceToTempFile, getDocumentSourceFromResource, getDocumentSourceFromResource, setUp
-
-
-
-
Method Detail
-
testHTMLBruteForceDetection
public void testHTMLBruteForceDetection() throws Exception- Throws:
Exception
-
testExplicitEncoding
public void testExplicitEncoding() throws ExceptionThis tests the behavior of Any23 to execute the extraction explicitly specifying the charset encoding of the input.- Throws:
Exception- if there is an error reading the input
-
testImplicitEncoding
public void testImplicitEncoding() throws ExceptionThis tests the behavior of Any23 to perform the extraction without passing it any charset encoding. The encoding is therefore guessed usingTikaEncodingDetectorclass.- Throws:
Exception- if there is an error reading the input
-
testRDFXMLDetectionAndExtraction
public void testRDFXMLDetectionAndExtraction() throws Exception- Throws:
Exception
-
testNTriplesDetectionAndExtraction
public void testNTriplesDetectionAndExtraction() throws Exception- Throws:
Exception
-
testNturtleDetectionAndExtraction
public void testNturtleDetectionAndExtraction() throws Exception- Throws:
Exception
-
testDemoCodeSnippet1
public void testDemoCodeSnippet1() throws ExceptionTests out the first code snipped used in Developer Manual.- Throws:
Exception- if there is an error reading the input
-
testDemoCodeSnippet2
public void testDemoCodeSnippet2() throws ExceptionTests out the second code snipped used in Developer Manual.- Throws:
Exception- if there is an error reading the input
-
testProgrammaticExtraction
public void testProgrammaticExtraction() throws ExtractionException, IOException, URISyntaxExceptionThis test checks the extraction behavior when the library is used programatically. This test is related to the issue #45, to verify the different behaviors between Maven and Ant. The behavior was related to a 2nd-level dependency introduced by Maven.- Throws:
ExtractionException- if there is an error running extraction logicIOException- if there is an error reading the inputURISyntaxException- if there is an error defining input URI's
-
testGZippedContent
public void testGZippedContent() throws IOException, URISyntaxException, ExtractionExceptionThis test checks if a URL that is supposed to be GZIPPED is correctly opened and parsed with theAny23facade.- Throws:
ExtractionException- if there is an error running extraction logicIOException- if there is an error reading the inputURISyntaxException- if there is an error defining input URI's
-
testExtractionParameters
public void testExtractionParameters() throws IOException, ExtractionException, TripleHandlerException
-
testExtractionParametersWithNestingDisabled
public void testExtractionParametersWithNestingDisabled() throws IOException, ExtractionException, TripleHandlerException
-
testExceptionPropagation
public void testExceptionPropagation() throws IOException- Throws:
IOException
-
testXMLMimeTypeManagement
public void testXMLMimeTypeManagement() throws IOException, ExtractionExceptionTest correct management of general XML content.- Throws:
ExtractionException- if there is an error running extraction logicIOException- if there is an error reading the input
-
testXMLMimeTypeManagementViaURL
public void testXMLMimeTypeManagementViaURL() throws IOException, ExtractionExceptionTest correct management of general XML content from URL source.- Throws:
ExtractionException- if there is an error running extraction logicIOException- if there is an error reading the input
-
testBlankNodesViaURL
public void testBlankNodesViaURL() throws IOException, ExtractionException- Throws:
IOExceptionExtractionException
-
testAbstractMethodErrorIssue186_1
public void testAbstractMethodErrorIssue186_1() throws IOException, ExtractionException- Throws:
IOExceptionExtractionException
-
testAbstractMethodErrorIssue186_2
public void testAbstractMethodErrorIssue186_2() throws IOException, ExtractionException- Throws:
IOExceptionExtractionException
-
testModifiableConfiguration_issue183
public void testModifiableConfiguration_issue183() throws Exception- Throws:
Exception
-
testIssue415InvalidNTriples
public void testIssue415InvalidNTriples() throws Exception- Throws:
Exception
-
-