org.apache.any23.io.nquads
Class NQuadsParserTest

java.lang.Object
  extended by org.apache.any23.io.nquads.NQuadsParserTest

public class NQuadsParserTest
extends Object

Test case for NQuadsParser.

Author:
Michele Mostarda (mostarda@fbk.eu)

Constructor Summary
NQuadsParserTest()
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testEndOfStreamReached()
          Tests the correct support for EOS exception.
 void testIncompleteParsing()
          Tests the correct behavior with incomplete input.
 void testLiteralEscapeManagement1()
          Tests the correct support for literal escaping.
 void testLiteralEscapeManagement2()
          Tests the correct support for literal escaping.
 void testParseBasic()
          Tests basic N-Quads parsing.
 void testParseBasicBNode()
          Tests basic N-Quads parsing with blank node.
 void testParseBasicLiteraDatatype()
          Tests N-Quads parsing with literal and datatype.
 void testParseBasicLiteral()
          Tests basic N-Quads parsing with literal.
 void testParseBasicLiteralLang()
          Tests N-Quads parsing with literal and language.
 void testParseEmptyLinesAndComments()
          Tests parsing of empty lines and comments.
 void testParserWithAllCases()
          Tests the parser with all cases defined by the NQuads grammar.
 void testParserWithRealData()
          Tests parser with real data.
 void testStatementWithInvalidDatatypeAndIgnoreValidation()
           
 void testStatementWithInvalidDatatypeAndVerifyValidation()
           
 void testStatementWithInvalidLiteralContentAndIgnoreValidation()
           
 void testStatementWithInvalidLiteralContentAndStrictValidation()
           
 void testUnicodeLiteralDecoding()
           
 void testUnicodeLiteralManagement()
           
 void testURIDecodingManagement()
          Tests the correct decoding of UTF-8 encoded chars in URIs.
 void testWrongUnicodeEncodedCharFail()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NQuadsParserTest

public NQuadsParserTest()
Method Detail

setUp

public void setUp()

tearDown

public void tearDown()

testIncompleteParsing

public void testIncompleteParsing()
                           throws org.openrdf.rio.RDFHandlerException,
                                  IOException,
                                  org.openrdf.rio.RDFParseException
Tests the correct behavior with incomplete input.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testParseEmptyLinesAndComments

public void testParseEmptyLinesAndComments()
                                    throws org.openrdf.rio.RDFHandlerException,
                                           IOException,
                                           org.openrdf.rio.RDFParseException
Tests parsing of empty lines and comments.

Throws:
IOException
org.openrdf.rio.RDFHandlerException
org.openrdf.rio.RDFParseException

testParseBasic

public void testParseBasic()
                    throws org.openrdf.rio.RDFHandlerException,
                           IOException,
                           org.openrdf.rio.RDFParseException
Tests basic N-Quads parsing.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testParseBasicBNode

public void testParseBasicBNode()
                         throws org.openrdf.rio.RDFHandlerException,
                                IOException,
                                org.openrdf.rio.RDFParseException
Tests basic N-Quads parsing with blank node.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testParseBasicLiteral

public void testParseBasicLiteral()
                           throws org.openrdf.rio.RDFHandlerException,
                                  IOException,
                                  org.openrdf.rio.RDFParseException
Tests basic N-Quads parsing with literal.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testParseBasicLiteralLang

public void testParseBasicLiteralLang()
                               throws org.openrdf.rio.RDFHandlerException,
                                      IOException,
                                      org.openrdf.rio.RDFParseException
Tests N-Quads parsing with literal and language.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testParseBasicLiteraDatatype

public void testParseBasicLiteraDatatype()
                                  throws org.openrdf.rio.RDFHandlerException,
                                         IOException,
                                         org.openrdf.rio.RDFParseException
Tests N-Quads parsing with literal and datatype.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testLiteralEscapeManagement1

public void testLiteralEscapeManagement1()
                                  throws org.openrdf.rio.RDFHandlerException,
                                         IOException,
                                         org.openrdf.rio.RDFParseException
Tests the correct support for literal escaping.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testLiteralEscapeManagement2

public void testLiteralEscapeManagement2()
                                  throws org.openrdf.rio.RDFHandlerException,
                                         IOException,
                                         org.openrdf.rio.RDFParseException
Tests the correct support for literal escaping.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testURIDecodingManagement

public void testURIDecodingManagement()
                               throws org.openrdf.rio.RDFHandlerException,
                                      IOException,
                                      org.openrdf.rio.RDFParseException
Tests the correct decoding of UTF-8 encoded chars in URIs.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testUnicodeLiteralManagement

public void testUnicodeLiteralManagement()
                                  throws org.openrdf.rio.RDFHandlerException,
                                         IOException,
                                         org.openrdf.rio.RDFParseException
Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testUnicodeLiteralDecoding

public void testUnicodeLiteralDecoding()
                                throws org.openrdf.rio.RDFHandlerException,
                                       IOException,
                                       org.openrdf.rio.RDFParseException
Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testWrongUnicodeEncodedCharFail

public void testWrongUnicodeEncodedCharFail()
                                     throws org.openrdf.rio.RDFHandlerException,
                                            IOException,
                                            org.openrdf.rio.RDFParseException
Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testEndOfStreamReached

public void testEndOfStreamReached()
                            throws org.openrdf.rio.RDFHandlerException,
                                   IOException,
                                   org.openrdf.rio.RDFParseException
Tests the correct support for EOS exception.

Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testParserWithAllCases

public void testParserWithAllCases()
                            throws IOException,
                                   org.openrdf.rio.RDFParseException,
                                   org.openrdf.rio.RDFHandlerException
Tests the parser with all cases defined by the NQuads grammar.

Throws:
IOException
org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFHandlerException

testParserWithRealData

public void testParserWithRealData()
                            throws IOException,
                                   org.openrdf.rio.RDFParseException,
                                   org.openrdf.rio.RDFHandlerException
Tests parser with real data.

Throws:
IOException
org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFHandlerException

testStatementWithInvalidLiteralContentAndIgnoreValidation

public void testStatementWithInvalidLiteralContentAndIgnoreValidation()
                                                               throws org.openrdf.rio.RDFHandlerException,
                                                                      IOException,
                                                                      org.openrdf.rio.RDFParseException
Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testStatementWithInvalidLiteralContentAndStrictValidation

public void testStatementWithInvalidLiteralContentAndStrictValidation()
                                                               throws org.openrdf.rio.RDFHandlerException,
                                                                      IOException,
                                                                      org.openrdf.rio.RDFParseException
Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testStatementWithInvalidDatatypeAndIgnoreValidation

public void testStatementWithInvalidDatatypeAndIgnoreValidation()
                                                         throws org.openrdf.rio.RDFHandlerException,
                                                                IOException,
                                                                org.openrdf.rio.RDFParseException
Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException

testStatementWithInvalidDatatypeAndVerifyValidation

public void testStatementWithInvalidDatatypeAndVerifyValidation()
                                                         throws org.openrdf.rio.RDFHandlerException,
                                                                IOException,
                                                                org.openrdf.rio.RDFParseException
Throws:
org.openrdf.rio.RDFHandlerException
IOException
org.openrdf.rio.RDFParseException


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.