Fix NQuads test that broke due to addition of DBPedia datatype handler

The dbpedia datatypes are verified in a very rudimentary way, by
checking that the prefix matches the dbpedia datatype prefix

Also fix test that relied on setStopAtFirstError(false), by turning off
the relevant error setting


Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/f2ded151
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/f2ded151
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/f2ded151

Branch: refs/heads/master
Commit: f2ded151c114f4fbe411704b099c26177d4c9f2d
Parents: a849b7b
Author: Peter Ansell <[email protected]>
Authored: Fri Apr 19 14:58:13 2013 +1000
Committer: Peter Ansell <[email protected]>
Committed: Wed Jun 26 10:08:07 2013 +1000

----------------------------------------------------------------------
 .../test/java/org/apache/any23/io/nquads/NQuadsParserTest.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/f2ded151/nquads/src/test/java/org/apache/any23/io/nquads/NQuadsParserTest.java
----------------------------------------------------------------------
diff --git 
a/nquads/src/test/java/org/apache/any23/io/nquads/NQuadsParserTest.java 
b/nquads/src/test/java/org/apache/any23/io/nquads/NQuadsParserTest.java
index 8d25e02..8f976cf 100644
--- a/nquads/src/test/java/org/apache/any23/io/nquads/NQuadsParserTest.java
+++ b/nquads/src/test/java/org/apache/any23/io/nquads/NQuadsParserTest.java
@@ -35,6 +35,7 @@ import org.openrdf.rio.RDFParseException;
 import org.openrdf.rio.RDFParser;
 import org.openrdf.rio.RioSetting;
 import org.openrdf.rio.helpers.BasicParserSettings;
+import org.openrdf.rio.helpers.NTriplesParserSettings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -481,7 +482,8 @@ public class NQuadsParserTest {
                     "<http://s1> <http://p1> <http://o1> <http://g1> .\n"
                 ).getBytes()
         );
-        parser.setStopAtFirstError(false);
+        //parser.setStopAtFirstError(false);
+        
parser.getParserConfig().addNonFatalError(NTriplesParserSettings.FAIL_ON_NTRIPLES_INVALID_LINES);
         parser.parse(bais, "http://base-uri";);
         rdfHandler.assertHandler(2);
         final List<Statement> statements = rdfHandler.getStatements();
@@ -555,7 +557,7 @@ public class NQuadsParserTest {
                 (
                         
"<http://dbpedia.org/resource/Camillo_Benso,_conte_di_Cavour> " +
                         "<http://dbpedia.org/property/mandatofine> " +
-                        "\"1380.0\"^^<http://dbpedia.org/datatype/second> " +
+                        
"\"1380.0\"^^<http://dbpedia.org/invalid/datatype/second> " +
                         
"<http://it.wikipedia.org/wiki/Camillo_Benso,_conte_di_Cavour#absolute-line=20> 
."
                 ).getBytes()
         );

Reply via email to