diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/GraphQLEngineTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/GraphQLEngineTests.java index 306231505..36aac9e05 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/GraphQLEngineTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/GraphQLEngineTests.java @@ -20,21 +20,15 @@ import org.hl7.fhir.utilities.graphql.IGraphQLStorageServices; import org.hl7.fhir.utilities.graphql.NameValue; import org.hl7.fhir.utilities.graphql.Parser; import org.hl7.fhir.utilities.xml.XMLUtil; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; import javax.xml.parsers.ParserConfigurationException; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; @@ -42,8 +36,6 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Stream; -import static org.junit.Assert.assertTrue; - public class GraphQLEngineTests implements IGraphQLStorageServices { public static Stream data() throws IOException, ParserConfigurationException, SAXException { @@ -91,7 +83,7 @@ public class GraphQLEngineTests implements IGraphQLStorageServices { msg = e.getMessage(); } if (ok) { - assertTrue("Expected to fail, but didn't", !output.equals("$error")); + Assertions.assertTrue(!output.equals("$error"), "Expected to fail, but didn't"); StringBuilder str = new StringBuilder(); gql.getOutput().setWriteWrapper(false); gql.getOutput().write(str, 0); @@ -99,10 +91,10 @@ public class GraphQLEngineTests implements IGraphQLStorageServices { IOUtils.copy(TestingUtilities.loadTestResourceStream("r5", "graphql", output), new FileOutputStream(TestingUtilities.tempFile("graphql", output))); TextFile.stringToFile(str.toString(), TestingUtilities.tempFile("graphql", output+".out")); msg = TestingUtilities.checkJsonIsSame(TestingUtilities.tempFile("graphql", output+".out"), TestingUtilities.tempFile("graphql", output)); - assertTrue(msg, Utilities.noString(msg)); + Assertions.assertTrue(Utilities.noString(msg), msg); } else - assertTrue("Error, but proper output was expected ("+msg+")", output.equals("$error")); + Assertions.assertTrue(output.equals("$error"), "Error, but proper output was expected ("+msg+")"); } @Override diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/GraphQLParserTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/GraphQLParserTests.java index 32210e336..6381aec4d 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/GraphQLParserTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/GraphQLParserTests.java @@ -1,6 +1,14 @@ package org.hl7.fhir.r5.test; -import static org.junit.Assert.assertTrue; +import org.hl7.fhir.r5.test.utils.TestingUtilities; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.graphql.EGraphEngine; +import org.hl7.fhir.utilities.graphql.EGraphQLException; +import org.hl7.fhir.utilities.graphql.Package; +import org.hl7.fhir.utilities.graphql.Parser; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import java.io.FileNotFoundException; import java.io.IOException; @@ -8,37 +16,24 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Stream; -import org.hl7.fhir.r5.test.utils.TestingUtilities; -import org.hl7.fhir.utilities.TextFile; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.utilities.graphql.EGraphEngine; -import org.hl7.fhir.utilities.graphql.EGraphQLException; -import org.hl7.fhir.utilities.graphql.Package; -import org.hl7.fhir.utilities.graphql.Parser; -import org.junit.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; +import static org.junit.Assert.assertTrue; public class GraphQLParserTests { - public static Stream data() throws FileNotFoundException, IOException { + public static Stream data() throws IOException { String src = TestingUtilities.loadTestResource("r5", "graphql", "parser-tests.gql"); String[] tests = src.split("###"); List objects = new ArrayList<>(); for (String s : tests) { if (!Utilities.noString(s.trim())) { - int l = s.indexOf('\r'); - objects.add(Arguments.of(s.substring(0, l), s.substring(l+2).trim())); + int l = s.indexOf('\r'); + objects.add(Arguments.of(s.substring(0, l), s.substring(l + 2).trim())); } } return objects.stream(); } - @ParameterizedTest(name = "{index}: {0}") + @ParameterizedTest(name = "{index}: {0}") @MethodSource("data") public void test(String name, String test) throws IOException, EGraphQLException, EGraphEngine { Package doc = Parser.parse(test); diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/MetaTest.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/MetaTest.java index 0858cc444..97f0de7b7 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/MetaTest.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/MetaTest.java @@ -2,11 +2,9 @@ package org.hl7.fhir.r5.test; import org.hl7.fhir.r5.model.Coding; import org.hl7.fhir.r5.model.Meta; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import static org.junit.Assert.*; -import static org.junit.Assert.assertEquals; - public class MetaTest { public static String TEST_SYSTEM = "TEST_SYSTEM"; public static String TEST_CODE = "TEST_CODE"; @@ -15,12 +13,12 @@ public class MetaTest { public void testMetaSecurity() { Meta meta = new Meta(); Coding coding = meta.addSecurity().setSystem(TEST_SYSTEM).setCode(TEST_CODE); - assertTrue(meta.hasSecurity()); - assertNotNull(meta.getSecurity()); - assertNotNull(meta.getSecurity(TEST_SYSTEM, TEST_CODE)); - assertEquals(1, meta.getSecurity().size()); - assertEquals(meta.getSecurity().get(0), meta.getSecurity(TEST_SYSTEM, TEST_CODE)); - assertEquals(meta.getSecurityFirstRep(), meta.getSecurity(TEST_SYSTEM, TEST_CODE)); - assertEquals(coding, meta.getSecurity(TEST_SYSTEM, TEST_CODE)); + Assertions.assertTrue(meta.hasSecurity()); + Assertions.assertNotNull(meta.getSecurity()); + Assertions.assertNotNull(meta.getSecurity(TEST_SYSTEM, TEST_CODE)); + Assertions.assertEquals(1, meta.getSecurity().size()); + Assertions.assertEquals(meta.getSecurity().get(0), meta.getSecurity(TEST_SYSTEM, TEST_CODE)); + Assertions.assertEquals(meta.getSecurityFirstRep(), meta.getSecurity(TEST_SYSTEM, TEST_CODE)); + Assertions.assertEquals(coding, meta.getSecurity(TEST_SYSTEM, TEST_CODE)); } } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGeneratorTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGeneratorTests.java index 7132abc49..acc5fa548 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGeneratorTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGeneratorTests.java @@ -1,6 +1,5 @@ package org.hl7.fhir.r5.test; -import org.fhir.ucum.UcumException; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.formats.XmlParser; import org.hl7.fhir.r5.model.DomainResource; @@ -23,7 +22,7 @@ public class NarrativeGeneratorTests { private NarrativeGenerator gen; @BeforeAll - public void setUp() throws FileNotFoundException, IOException, FHIRException, UcumException { + public void setUp() throws FHIRException { gen = new NarrativeGenerator("", null, TestingUtilities.context()); } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/ResourceRoundTripTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/ResourceRoundTripTests.java index 00085fbd5..7dd7f8998 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/ResourceRoundTripTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/ResourceRoundTripTests.java @@ -1,7 +1,6 @@ package org.hl7.fhir.r5.test; import org.apache.commons.io.IOUtils; -import org.fhir.ucum.UcumException; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.formats.IParser; import org.hl7.fhir.r5.formats.IParser.OutputStyle; @@ -20,7 +19,7 @@ import java.io.*; public class ResourceRoundTripTests { @Test - public void test() throws FileNotFoundException, IOException, FHIRException, EOperationOutcome, UcumException { + public void test() throws IOException, FHIRException, EOperationOutcome { Resource res = new XmlParser().parse(TestingUtilities.loadTestResourceStream("r5", "unicode.xml")); new NarrativeGenerator("", "", TestingUtilities.context()).generate((DomainResource) res, null); IOUtils.copy(TestingUtilities.loadTestResourceStream("r5", "unicode.xml"), new FileOutputStream(TestingUtilities.tempFile("gen", "unicode.xml"))); diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnomedExpressionsTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnomedExpressionsTests.java index 08f6cfc8b..b991cee59 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnomedExpressionsTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnomedExpressionsTests.java @@ -2,10 +2,9 @@ package org.hl7.fhir.r5.test; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.utils.SnomedExpressions; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertNotNull; - public class SnomedExpressionsTests { @Test @@ -47,7 +46,7 @@ public class SnomedExpressionsTests { } private void p(String expression) throws FHIRException { - assertNotNull("must be present", SnomedExpressions.parse(expression)); + Assertions.assertNotNull(SnomedExpressions.parse(expression), "must be present"); } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/StructureMapUtilitiesTest.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/StructureMapUtilitiesTest.java index c211f979e..a3de33601 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/StructureMapUtilitiesTest.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/StructureMapUtilitiesTest.java @@ -10,7 +10,6 @@ import org.hl7.fhir.r5.utils.StructureMapUtilities; import org.hl7.fhir.r5.utils.StructureMapUtilities.ITransformerServices; import org.hl7.fhir.utilities.cache.PackageCacheManager; import org.hl7.fhir.utilities.cache.ToolsVersion; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -24,7 +23,7 @@ public class StructureMapUtilitiesTest implements ITransformerServices { static private SimpleWorkerContext context; - @BeforeAll + // @BeforeAll static public void setUp() throws Exception { PackageCacheManager pcm = new PackageCacheManager(true, ToolsVersion.TOOLS_VERSION); context = SimpleWorkerContext.fromPackage(pcm.loadPackage("hl7.fhir.core", "4.0.0")); diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/TurtleTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/TurtleTests.java index 4355ffbb1..7c5aab4c4 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/TurtleTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/TurtleTests.java @@ -1,23 +1,22 @@ package org.hl7.fhir.r5.test; -import java.io.FileNotFoundException; -import java.io.IOException; - import org.hl7.fhir.r5.test.utils.TestingUtilities; import org.hl7.fhir.r5.utils.formats.Turtle; - -import junit.framework.Assert; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.FileNotFoundException; +import java.io.IOException; + public class TurtleTests { private void doTest(String s, boolean ok) throws Exception { try { Turtle ttl = new Turtle(); ttl.parse(s); - Assert.assertTrue(ok); + Assertions.assertTrue(ok); } catch (Exception e) { - Assert.assertTrue(e.getMessage(), !ok); + Assertions.assertFalse(ok, e.getMessage()); } } @@ -25,23 +24,28 @@ public class TurtleTests { public void test_double_lower_case_e1() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "double_lower_case_e.nt"), true); } + @Test public void test_double_lower_case_e2() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "double_lower_case_e.ttl"), true); } + @Test public void test_empty_collection1() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "empty_collection.nt"), true); } + @Test public void test_empty_collection2() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "empty_collection.ttl"), true); } + @Test public void test_first1() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "first.nt"), true); } -// @Test + + // @Test // public void test_first2() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "first.ttl"), true); // } @@ -49,243 +53,303 @@ public class TurtleTests { public void test_HYPHEN_MINUS_in_localNameNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "HYPHEN_MINUS_in_localName.nt"), true); } + @Test public void test_HYPHEN_MINUS_in_localName() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "HYPHEN_MINUS_in_localName.ttl"), true); } + @Test public void test_IRI_spoNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "IRI_spo.nt"), true); } + @Test public void test_IRI_subject() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "IRI_subject.ttl"), true); } + @Test public void test_IRI_with_all_punctuationNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "IRI_with_all_punctuation.nt"), true); } + @Test public void test_IRI_with_all_punctuation() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "IRI_with_all_punctuation.ttl"), true); } + @Test public void test_IRI_with_eight_digit_numeric_escape() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "IRI_with_eight_digit_numeric_escape.ttl"), true); } + @Test public void test_IRI_with_four_digit_numeric_escape() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "IRI_with_four_digit_numeric_escape.ttl"), true); } + @Test public void test_IRIREF_datatypeNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "IRIREF_datatype.nt"), true); } + @Test public void test_IRIREF_datatype() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "IRIREF_datatype.ttl"), true); } + @Test public void test_labeled_blank_node_objectNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "labeled_blank_node_object.nt"), true); } + @Test public void test_labeled_blank_node_object() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "labeled_blank_node_object.ttl"), true); } + @Test public void test_labeled_blank_node_subjectNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "labeled_blank_node_subject.nt"), true); } + @Test public void test_labeled_blank_node_subject() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "labeled_blank_node_subject.ttl"), true); } + @Test public void test_labeled_blank_node_with_leading_digit() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "labeled_blank_node_with_leading_digit.ttl"), true); } + @Test public void test_labeled_blank_node_with_leading_underscore() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "labeled_blank_node_with_leading_underscore.ttl"), true); } + @Test public void test_labeled_blank_node_with_non_leading_extras() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "labeled_blank_node_with_non_leading_extras.ttl"), true); } + @Test public void test_labeled_blank_node_with_PN_CHARS_BASE_character_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.ttl"), false); } + @Test public void test_langtagged_LONG() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "langtagged_LONG.ttl"), true); } + @Test public void test_langtagged_LONG_with_subtagNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "langtagged_LONG_with_subtag.nt"), true); } + @Test public void test_langtagged_LONG_with_subtag() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "langtagged_LONG_with_subtag.ttl"), true); } + @Test public void test_langtagged_non_LONGNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "langtagged_non_LONG.nt"), true); } + @Test public void test_langtagged_non_LONG() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "langtagged_non_LONG.ttl"), true); } + @Test public void test_lantag_with_subtagNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "lantag_with_subtag.nt"), true); } + @Test public void test_lantag_with_subtag() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "lantag_with_subtag.ttl"), true); } + @Test public void test_lastNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "last.nt"), true); } + @Test public void test_last() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "last.ttl"), false); } + @Test public void test_literal_falseNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_false.nt"), true); } + @Test public void test_literal_false() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_false.ttl"), true); } + @Test public void test_LITERAL_LONG1() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG1.ttl"), true); } + @Test public void test_LITERAL_LONG1_ascii_boundariesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG1_ascii_boundaries.nt"), false); } + @Test public void test_LITERAL_LONG1_ascii_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG1_ascii_boundaries.ttl"), true); } + @Test public void test_LITERAL_LONG1_with_1_squoteNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG1_with_1_squote.nt"), true); } + @Test public void test_LITERAL_LONG1_with_1_squote() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG1_with_1_squote.ttl"), true); } + @Test public void test_LITERAL_LONG1_with_2_squotesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG1_with_2_squotes.nt"), true); } + @Test public void test_LITERAL_LONG1_with_2_squotes() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG1_with_2_squotes.ttl"), true); } + @Test public void test_LITERAL_LONG1_with_UTF8_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG1_with_UTF8_boundaries.ttl"), true); } + @Test public void test_LITERAL_LONG2() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2.ttl"), true); } + @Test public void test_LITERAL_LONG2_ascii_boundariesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_ascii_boundaries.nt"), false); } + @Test public void test_LITERAL_LONG2_ascii_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_ascii_boundaries.ttl"), true); } + @Test public void test_LITERAL_LONG2_with_1_squoteNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_with_1_squote.nt"), true); } + @Test public void test_LITERAL_LONG2_with_1_squote() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_with_1_squote.ttl"), true); } + @Test public void test_LITERAL_LONG2_with_2_squotesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_with_2_squotes.nt"), true); } + @Test public void test_LITERAL_LONG2_with_2_squotes() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_with_2_squotes.ttl"), true); } + @Test public void test_LITERAL_LONG2_with_REVERSE_SOLIDUSNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_with_REVERSE_SOLIDUS.nt"), false); } + @Test public void test_LITERAL_LONG2_with_REVERSE_SOLIDUS() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_with_REVERSE_SOLIDUS.ttl"), false); } + @Test public void test_LITERAL_LONG2_with_UTF8_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_LONG2_with_UTF8_boundaries.ttl"), true); } + @Test public void test_literal_trueNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_true.nt"), true); } + @Test public void test_literal_true() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_true.ttl"), true); } + @Test public void test_literal_with_BACKSPACENT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_BACKSPACE.nt"), false); } + @Test public void test_literal_with_BACKSPACE() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_BACKSPACE.ttl"), true); } + @Test public void test_literal_with_CARRIAGE_RETURNNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_CARRIAGE_RETURN.nt"), true); } + @Test public void test_literal_with_CARRIAGE_RETURN() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_CARRIAGE_RETURN.ttl"), true); } + @Test public void test_literal_with_CHARACTER_TABULATIONNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_CHARACTER_TABULATION.nt"), true); } + @Test public void test_literal_with_CHARACTER_TABULATION() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_CHARACTER_TABULATION.ttl"), true); } + @Test public void test_literal_with_escaped_BACKSPACE() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_escaped_BACKSPACE.ttl"), false); } + @Test public void test_literal_with_escaped_CARRIAGE_RETURN() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_escaped_CARRIAGE_RETURN.ttl"), true); } + @Test public void test_literal_with_escaped_CHARACTER_TABULATION() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_escaped_CHARACTER_TABULATION.ttl"), true); } + @Test public void test_literal_with_escaped_FORM_FEED() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_escaped_FORM_FEED.ttl"), true); } + @Test public void test_literal_with_escaped_LINE_FEED() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_escaped_LINE_FEED.ttl"), true); } -// @Test + + // @Test // public void test_literal_with_FORM_FEEDNT() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "literal_with_FORM_FEED.nt"), true); // } @@ -293,63 +357,78 @@ public class TurtleTests { public void test_literal_with_FORM_FEED() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_FORM_FEED.ttl"), true); } + @Test public void test_literal_with_LINE_FEEDNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_LINE_FEED.nt"), true); } + @Test public void test_literal_with_LINE_FEED() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_LINE_FEED.ttl"), true); } + @Test public void test_literal_with_numeric_escape4NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_numeric_escape4.nt"), true); } + @Test public void test_literal_with_numeric_escape4() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_numeric_escape4.ttl"), true); } + @Test public void test_literal_with_numeric_escape8() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_numeric_escape8.ttl"), true); } + @Test public void test_literal_with_REVERSE_SOLIDUSNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_REVERSE_SOLIDUS.nt"), false); } + @Test public void test_literal_with_REVERSE_SOLIDUS() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "literal_with_REVERSE_SOLIDUS.ttl"), true); } + @Test public void test_LITERAL_with_UTF8_boundariesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL_with_UTF8_boundaries.nt"), true); } + @Test public void test_LITERAL1NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1.nt"), true); } + @Test public void test_LITERAL1() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1.ttl"), true); } + @Test public void test_LITERAL1_all_controlsNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1_all_controls.nt"), false); } + @Test public void test_LITERAL1_all_controls() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1_all_controls.ttl"), true); } + @Test public void test_LITERAL1_all_punctuationNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1_all_punctuation.nt"), true); } + @Test public void test_LITERAL1_all_punctuation() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1_all_punctuation.ttl"), true); } -// @Test + + // @Test // public void test_LITERAL1_ascii_boundariesNT() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1_ascii_boundaries.nt"), true); // } @@ -357,43 +436,53 @@ public class TurtleTests { public void test_LITERAL1_ascii_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1_ascii_boundaries.ttl"), true); } + @Test public void test_LITERAL1_with_UTF8_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL1_with_UTF8_boundaries.ttl"), true); } + @Test public void test_LITERAL2() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL2.ttl"), true); } + @Test public void test_LITERAL2_ascii_boundariesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL2_ascii_boundaries.nt"), false); } + @Test public void test_LITERAL2_ascii_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL2_ascii_boundaries.ttl"), true); } + @Test public void test_LITERAL2_with_UTF8_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "LITERAL2_with_UTF8_boundaries.ttl"), true); } + @Test public void test_localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundariesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries.nt"), true); } + @Test public void test_localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries.ttl"), true); } + @Test public void test_localName_with_assigned_nfc_PN_CHARS_BASE_character_boundariesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.nt"), true); } + @Test public void test_localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.ttl"), false); } -// don't need to support property names with ':' + + // don't need to support property names with ':' // @Test // public void test_localname_with_COLONNT() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "localname_with_COLON.nt"), true); @@ -406,71 +495,88 @@ public class TurtleTests { public void test_localName_with_leading_digitNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_leading_digit.nt"), true); } + @Test public void test_localName_with_leading_digit() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_leading_digit.ttl"), true); } + @Test public void test_localName_with_leading_underscoreNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_leading_underscore.nt"), true); } + @Test public void test_localName_with_leading_underscore() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_leading_underscore.ttl"), true); } + @Test public void test_localName_with_nfc_PN_CHARS_BASE_character_boundariesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_nfc_PN_CHARS_BASE_character_boundaries.nt"), true); } + @Test public void test_localName_with_nfc_PN_CHARS_BASE_character_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_nfc_PN_CHARS_BASE_character_boundaries.ttl"), false); } + @Test public void test_localName_with_non_leading_extrasNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_non_leading_extras.nt"), true); } + @Test public void test_localName_with_non_leading_extras() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "localName_with_non_leading_extras.ttl"), true); } + @Test public void test_negative_numericNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "negative_numeric.nt"), true); } + @Test public void test_negative_numeric() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "negative_numeric.ttl"), true); } + @Test public void test_nested_blankNodePropertyListsNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "nested_blankNodePropertyLists.nt"), true); } + @Test public void test_nested_blankNodePropertyLists() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "nested_blankNodePropertyLists.ttl"), true); } + @Test public void test_nested_collectionNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "nested_collection.nt"), true); } + @Test public void test_nested_collection() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "nested_collection.ttl"), false); } + @Test public void test_number_sign_following_localNameNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "number_sign_following_localName.nt"), true); } + @Test public void test_number_sign_following_localName() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "number_sign_following_localName.ttl"), true); } + @Test public void test_number_sign_following_PNAME_NSNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "number_sign_following_PNAME_NS.nt"), true); } -// @Test + + // @Test // public void test_number_sign_following_PNAME_NS() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "number_sign_following_PNAME_NS.ttl"), true); // } @@ -478,31 +584,38 @@ public class TurtleTests { public void test_numeric_with_leading_0NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "numeric_with_leading_0.nt"), true); } + @Test public void test_numeric_with_leading_0() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "numeric_with_leading_0.ttl"), true); } + @Test public void test_objectList_with_two_objectsNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "objectList_with_two_objects.nt"), true); } + @Test public void test_objectList_with_two_objects() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "objectList_with_two_objects.ttl"), true); } + @Test public void test_old_style_base() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "old_style_base.ttl"), true); } + @Test public void test_old_style_prefix() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "old_style_prefix.ttl"), true); } + @Test public void test_percent_escaped_localNameNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "percent_escaped_localName.nt"), true); } -// @Test + + // @Test // public void test_percent_escaped_localName() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "percent_escaped_localName.ttl"), true); // } @@ -510,19 +623,23 @@ public class TurtleTests { public void test_positive_numericNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "positive_numeric.nt"), true); } + @Test public void test_positive_numeric() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "positive_numeric.ttl"), true); } + @Test public void test_predicateObjectList_with_two_objectListsNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "predicateObjectList_with_two_objectLists.nt"), true); } + @Test public void test_predicateObjectList_with_two_objectLists() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "predicateObjectList_with_two_objectLists.ttl"), true); } -// @Test + + // @Test // public void test_prefix_only_IRI() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "prefix_only_IRI.ttl"), true); // } @@ -530,47 +647,58 @@ public class TurtleTests { public void test_prefix_reassigned_and_usedNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "prefix_reassigned_and_used.nt"), true); } + @Test public void test_prefix_reassigned_and_used() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "prefix_reassigned_and_used.ttl"), true); } + @Test public void test_prefix_with_non_leading_extras() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "prefix_with_non_leading_extras.ttl"), true); } + @Test public void test_prefix_with_PN_CHARS_BASE_character_boundaries() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "prefix_with_PN_CHARS_BASE_character_boundaries.ttl"), true); } + @Test public void test_prefixed_IRI_object() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "prefixed_IRI_object.ttl"), true); } + @Test public void test_prefixed_IRI_predicate() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "prefixed_IRI_predicate.ttl"), true); } + @Test public void test_prefixed_name_datatype() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "prefixed_name_datatype.ttl"), true); } + @Test public void test_repeated_semis_at_end() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "repeated_semis_at_end.ttl"), true); } + @Test public void test_repeated_semis_not_at_endNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "repeated_semis_not_at_end.nt"), true); } + @Test public void test_repeated_semis_not_at_end() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "repeated_semis_not_at_end.ttl"), true); } + @Test public void test_reserved_escaped_localNameNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "reserved_escaped_localName.nt"), true); } -// @Test + + // @Test // public void test_reserved_escaped_localName() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "reserved_escaped_localName.ttl"), true); // } @@ -578,27 +706,33 @@ public class TurtleTests { public void test_sole_blankNodePropertyList() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "sole_blankNodePropertyList.ttl"), true); } + @Test public void test_SPARQL_style_base() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "SPARQL_style_base.ttl"), true); } + @Test public void test_SPARQL_style_prefix() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "SPARQL_style_prefix.ttl"), true); } + @Test public void test_turtle_eval_bad_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-eval-bad-01.ttl"), false); } + @Test public void test_turtle_eval_bad_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-eval-bad-02.ttl"), false); } + @Test public void test_turtle_eval_bad_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-eval-bad-03.ttl"), false); } -// @Test + + // @Test // public void test_turtle_eval_bad_04() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-eval-bad-04.ttl"), false); // } @@ -606,247 +740,308 @@ public class TurtleTests { public void test_turtle_eval_struct_01NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-eval-struct-01.nt"), true); } + @Test public void test_turtle_eval_struct_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-eval-struct-01.ttl"), true); } + @Test public void test_turtle_eval_struct_02NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-eval-struct-02.nt"), true); } + @Test public void test_turtle_eval_struct_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-eval-struct-02.ttl"), true); } + @Test public void test_turtle_subm_01NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-01.nt"), true); } + @Test public void test_turtle_subm_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-01.ttl"), true); } + @Test public void test_turtle_subm_02NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-02.nt"), true); } + @Test public void test_turtle_subm_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-02.ttl"), true); } + @Test public void test_turtle_subm_03NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-03.nt"), true); } + @Test public void test_turtle_subm_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-03.ttl"), false); } + @Test public void test_turtle_subm_04NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-04.nt"), true); } + @Test public void test_turtle_subm_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-04.ttl"), true); } + @Test public void test_turtle_subm_05NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-05.nt"), true); } + @Test public void test_turtle_subm_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-05.ttl"), true); } + @Test public void test_turtle_subm_06NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-06.nt"), true); } + @Test public void test_turtle_subm_06() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-06.ttl"), true); } + @Test public void test_turtle_subm_07NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-07.nt"), true); } + @Test public void test_turtle_subm_07() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-07.ttl"), false); } + @Test public void test_NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-08.nt"), true); } + @Test public void test_turtle_subm_08() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-08.ttl"), true); } + @Test public void test_turtle_subm_09NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-09.nt"), true); } + @Test public void test_turtle_subm_09() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-09.ttl"), true); } + @Test public void test_turtle_subm_10NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-10.nt"), true); } + @Test public void test_turtle_subm_10() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-10.ttl"), true); } + @Test public void test_turtle_subm_11NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-11.nt"), true); } + @Test public void test_turtle_subm_11() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-11.ttl"), true); } + @Test public void test_turtle_subm_12NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-12.nt"), true); } + @Test public void test_turtle_subm_12() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-12.ttl"), true); } + @Test public void test_turtle_subm_13NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-13.nt"), true); } + @Test public void test_turtle_subm_13() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-13.ttl"), true); } + @Test public void test_turtle_subm_14NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-14.nt"), true); } + @Test public void test_turtle_subm_14() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-14.ttl"), false); } + @Test public void test_turtle_subm_15NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-15.nt"), true); } + @Test public void test_turtle_subm_15() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-15.ttl"), true); } + @Test public void test_turtle_subm_16NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-16.nt"), true); } + @Test public void test_turtle_subm_16() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-16.ttl"), true); } + @Test public void test_turtle_subm_17NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-17.nt"), true); } + @Test public void test_turtle_subm_17() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-17.ttl"), true); } + @Test public void test_turtle_subm_18NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-18.nt"), false); } + @Test public void test_turtle_subm_18() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-18.ttl"), false); } + @Test public void test_turtle_subm_19NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-19.nt"), true); } + @Test public void test_turtle_subm_19() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-19.ttl"), true); } + @Test public void test_turtle_subm_20NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-20.nt"), true); } + @Test public void test_turtle_subm_20() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-20.ttl"), true); } + @Test public void test_turtle_subm_21NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-21.nt"), true); } + @Test public void test_turtle_subm_21() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-21.ttl"), true); } + @Test public void test_turtle_subm_22NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-22.nt"), true); } + @Test public void test_turtle_subm_22() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-22.ttl"), true); } + @Test public void test_turtle_subm_23NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-23.nt"), true); } + @Test public void test_turtle_subm_23() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-23.ttl"), false); } + @Test public void test_turtle_subm_24NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-24.nt"), true); } + @Test public void test_turtle_subm_24() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-24.ttl"), true); } + @Test public void test_turtle_subm_25NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-25.nt"), true); } + @Test public void test_turtle_subm_25() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-25.ttl"), true); } + @Test public void test_turtle_subm_26NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-26.nt"), true); } + @Test public void test_turtle_subm_26() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-26.ttl"), true); } + @Test public void test_turtle_subm_27NT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-27.nt"), true); } + @Test public void test_turtle_subm_27() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-subm-27.ttl"), false); } + @Test public void test_turtle_syntax_bad_base_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-base-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_base_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-base-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_base_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-base-03.ttl"), false); } -// @Test + + // @Test // public void test_turtle_syntax_bad_blank_label_dot_end() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-blank-label-dot-end.ttl"), false); // } @@ -854,87 +1049,108 @@ public class TurtleTests { public void test_turtle_syntax_bad_esc_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-esc-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_esc_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-esc-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_esc_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-esc-03.ttl"), false); } + @Test public void test_turtle_syntax_bad_esc_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-esc-04.ttl"), false); } + @Test public void test_turtle_syntax_bad_kw_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-kw-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_kw_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-kw-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_kw_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-kw-03.ttl"), false); } + @Test public void test_turtle_syntax_bad_kw_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-kw-04.ttl"), false); } + @Test public void test_turtle_syntax_bad_kw_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-kw-05.ttl"), false); } + @Test public void test_turtle_syntax_bad_lang_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-lang-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_LITERAL2_with_langtag_and_datatype() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-LITERAL2_with_langtag_and_datatype.ttl"), false); } + @Test public void test_turtle_syntax_bad_ln_dash_start() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-ln-dash-start.ttl"), true); } + @Test public void test_turtle_syntax_bad_ln_escape() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-ln-escape.ttl"), false); } + @Test public void test_turtle_syntax_bad_ln_escape_start() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-ln-escape-start.ttl"), false); } + @Test public void test_turtle_syntax_bad_missing_ns_dot_end() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-missing-ns-dot-end.ttl"), false); } + @Test public void test_turtle_syntax_bad_missing_ns_dot_start() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-missing-ns-dot-start.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-03.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-04.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-05.ttl"), false); } -// @Test + + // @Test // public void test_turtle_syntax_bad_n3_extras_06() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-06.ttl"), false); // } @@ -942,71 +1158,88 @@ public class TurtleTests { public void test_turtle_syntax_bad_n3_extras_07() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-07.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_08() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-08.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_09() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-09.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_10() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-10.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_11() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-11.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_12() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-12.ttl"), false); } + @Test public void test_turtle_syntax_bad_n3_extras_13() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-n3-extras-13.ttl"), false); } + @Test public void test_turtle_syntax_bad_ns_dot_end() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-ns-dot-end.ttl"), true); } + @Test public void test_turtle_syntax_bad_ns_dot_start() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-ns-dot-start.ttl"), false); } + @Test public void test_turtle_syntax_bad_num_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-num-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_num_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-num-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_num_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-num-03.ttl"), false); } + @Test public void test_turtle_syntax_bad_num_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-num-04.ttl"), false); } + @Test public void test_turtle_syntax_bad_num_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-num-05.ttl"), false); } + @Test public void test_turtle_syntax_bad_number_dot_in_anon() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-number-dot-in-anon.ttl"), false); } + @Test public void test_turtle_syntax_bad_pname_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-pname-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_pname_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-pname-02.ttl"), false); } -// @Test + + // @Test // public void test_turtle_syntax_bad_pname_03() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-pname-03.ttl"), false); // } @@ -1014,119 +1247,148 @@ public class TurtleTests { public void test_turtle_syntax_bad_prefix_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-prefix-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_prefix_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-prefix-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_prefix_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-prefix-03.ttl"), false); } + @Test public void test_turtle_syntax_bad_prefix_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-prefix-04.ttl"), false); } + @Test public void test_turtle_syntax_bad_prefix_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-prefix-05.ttl"), false); } + @Test public void test_turtle_syntax_bad_string_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-string-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_string_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-string-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_string_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-string-03.ttl"), false); } + @Test public void test_turtle_syntax_bad_string_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-string-04.ttl"), false); } + @Test public void test_turtle_syntax_bad_string_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-string-05.ttl"), false); } + @Test public void test_turtle_syntax_bad_string_06() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-string-06.ttl"), false); } + @Test public void test_turtle_syntax_bad_string_07() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-string-07.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-01.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-03.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-04.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-05.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_06() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-06.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_07() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-07.ttl"), true); } + @Test public void test_turtle_syntax_bad_struct_08() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-08.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_09() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-09.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_10() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-10.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_11() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-11.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_12() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-12.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_13() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-13.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_14() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-14.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_15() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-15.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_16() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-16.ttl"), false); } + @Test public void test_turtle_syntax_bad_struct_17() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-struct-17.ttl"), true); } -// @Test + + // @Test // public void test_turtle_syntax_bad_uri_01() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-uri-01.ttl"), false); // } @@ -1134,11 +1396,13 @@ public class TurtleTests { public void test_turtle_syntax_bad_uri_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-uri-02.ttl"), false); } + @Test public void test_turtle_syntax_bad_uri_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-uri-03.ttl"), false); } -// @Test + + // @Test // public void test_turtle_syntax_bad_uri_04() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bad-uri-04.ttl"), false); // } @@ -1150,103 +1414,128 @@ public class TurtleTests { public void test_turtle_syntax_base_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-base-01.ttl"), true); } + @Test public void test_turtle_syntax_base_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-base-02.ttl"), true); } + @Test public void test_turtle_syntax_base_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-base-03.ttl"), true); } + @Test public void test_turtle_syntax_base_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-base-04.ttl"), true); } + @Test public void test_turtle_syntax_blank_label() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-blank-label.ttl"), true); } + @Test public void test_turtle_syntax_bnode_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-01.ttl"), true); } + @Test public void test_turtle_syntax_bnode_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-02.ttl"), true); } + @Test public void test_turtle_syntax_bnode_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-03.ttl"), true); } + @Test public void test_turtle_syntax_bnode_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-04.ttl"), true); } + @Test public void test_turtle_syntax_bnode_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-05.ttl"), true); } + @Test public void test_turtle_syntax_bnode_06() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-06.ttl"), true); } + @Test public void test_turtle_syntax_bnode_07() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-07.ttl"), true); } + @Test public void test_turtle_syntax_bnode_08() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-08.ttl"), true); } + @Test public void test_turtle_syntax_bnode_09() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-09.ttl"), true); } + @Test public void test_turtle_syntax_bnode_10() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-bnode-10.ttl"), true); } + @Test public void test_turtle_syntax_datatypes_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-datatypes-01.ttl"), true); } + @Test public void test_turtle_syntax_datatypes_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-datatypes-02.ttl"), true); } + @Test public void test_turtle_syntax_file_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-file-01.ttl"), true); } + @Test public void test_turtle_syntax_file_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-file-02.ttl"), true); } + @Test public void test_turtle_syntax_file_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-file-03.ttl"), true); } + @Test public void test_turtle_syntax_kw_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-kw-01.ttl"), true); } + @Test public void test_turtle_syntax_kw_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-kw-02.ttl"), true); } + @Test public void test_turtle_syntax_kw_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-kw-03.ttl"), false); } + @Test public void test_turtle_syntax_lists_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-lists-01.ttl"), true); } + @Test public void test_turtle_syntax_lists_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-lists-02.ttl"), true); } -// @Test + + // @Test // public void test_turtle_syntax_lists_03() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-lists-03.ttl"), true); // } @@ -1266,27 +1555,33 @@ public class TurtleTests { public void test_turtle_syntax_ln_dots() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-ln-dots.ttl"), false); } + @Test public void test_turtle_syntax_ns_dots() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-ns-dots.ttl"), true); } + @Test public void test_turtle_syntax_number_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-01.ttl"), true); } + @Test public void test_turtle_syntax_number_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-02.ttl"), true); } + @Test public void test_turtle_syntax_number_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-03.ttl"), true); } + @Test public void test_turtle_syntax_number_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-04.ttl"), true); } -// @Test + + // @Test // public void test_turtle_syntax_number_05() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-05.ttl"), true); // } @@ -1294,11 +1589,13 @@ public class TurtleTests { public void test_turtle_syntax_number_06() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-06.ttl"), true); } + @Test public void test_turtle_syntax_number_07() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-07.ttl"), true); } -// @Test + + // @Test // public void test_turtle_syntax_number_08() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-08.ttl"), true); // } @@ -1306,31 +1603,38 @@ public class TurtleTests { public void test_turtle_syntax_number_09() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-09.ttl"), true); } + @Test public void test_turtle_syntax_number_10() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-10.ttl"), true); } + @Test public void test_turtle_syntax_number_11() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-number-11.ttl"), true); } + @Test public void test_turtle_syntax_pname_esc_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-pname-esc-01.ttl"), false); } + @Test public void test_turtle_syntax_pname_esc_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-pname-esc-02.ttl"), false); } + @Test public void test_turtle_syntax_pname_esc_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-pname-esc-03.ttl"), false); } + @Test public void test_turtle_syntax_prefix_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-prefix-01.ttl"), true); } -// @Test + + // @Test // public void test_turtle_syntax_prefix_02() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-prefix-02.ttl"), true); // } @@ -1338,11 +1642,13 @@ public class TurtleTests { public void test_turtle_syntax_prefix_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-prefix-03.ttl"), true); } + @Test public void test_turtle_syntax_prefix_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-prefix-04.ttl"), true); } -// @Test + + // @Test // public void test_turtle_syntax_prefix_05() throws Exception { // doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-prefix-05.ttl"), true); // } @@ -1354,166 +1660,207 @@ public class TurtleTests { public void test_turtle_syntax_prefix_07() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-prefix-07.ttl"), true); } + @Test public void test_turtle_syntax_prefix_08() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-prefix-08.ttl"), true); } + @Test public void test_turtle_syntax_prefix_09() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-prefix-09.ttl"), true); } + @Test public void test_turtle_syntax_str_esc_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-str-esc-01.ttl"), true); } + @Test public void test_turtle_syntax_str_esc_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-str-esc-02.ttl"), true); } + @Test public void test_turtle_syntax_str_esc_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-str-esc-03.ttl"), true); } + @Test public void test_turtle_syntax_string_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-01.ttl"), true); } + @Test public void test_turtle_syntax_string_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-02.ttl"), true); } + @Test public void test_turtle_syntax_string_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-03.ttl"), true); } + @Test public void test_turtle_syntax_string_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-04.ttl"), true); } + @Test public void test_turtle_syntax_string_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-05.ttl"), true); } + @Test public void test_turtle_syntax_string_06() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-06.ttl"), true); } + @Test public void test_turtle_syntax_string_07() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-07.ttl"), true); } + @Test public void test_turtle_syntax_string_08() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-08.ttl"), true); } + @Test public void test_turtle_syntax_string_09() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-09.ttl"), true); } + @Test public void test_turtle_syntax_string_10() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-10.ttl"), true); } + @Test public void test_turtle_syntax_string_11() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-string-11.ttl"), true); } + @Test public void test_turtle_syntax_struct_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-struct-01.ttl"), true); } + @Test public void test_turtle_syntax_struct_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-struct-02.ttl"), true); } + @Test public void test_turtle_syntax_struct_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-struct-03.ttl"), true); } + @Test public void test_turtle_syntax_struct_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-struct-04.ttl"), true); } + @Test public void test_turtle_syntax_struct_05() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-struct-05.ttl"), true); } + @Test public void test_turtle_syntax_uri_01() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-uri-01.ttl"), true); } + @Test public void test_turtle_syntax_uri_02() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-uri-02.ttl"), true); } + @Test public void test_turtle_syntax_uri_03() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-uri-03.ttl"), true); } + @Test public void test_turtle_syntax_uri_04() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "turtle-syntax-uri-04.ttl"), true); } + @Test public void test_two_LITERAL_LONG2sNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "two_LITERAL_LONG2s.nt"), true); } + @Test public void test_two_LITERAL_LONG2s() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "two_LITERAL_LONG2s.ttl"), true); } + @Test public void test_underscore_in_localNameNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "underscore_in_localName.nt"), true); } + @Test public void test_underscore_in_localName() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "underscore_in_localName.ttl"), true); } + @Test public void test_anonymous_blank_node_object() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "anonymous_blank_node_object.ttl"), true); } + @Test public void test_anonymous_blank_node_subject() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "anonymous_blank_node_subject.ttl"), true); } + @Test public void test_bareword_a_predicateNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "bareword_a_predicate.nt"), true); } + @Test public void test_bareword_a_predicate() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "bareword_a_predicate.ttl"), true); } + @Test public void test_bareword_decimalNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "bareword_decimal.nt"), true); } + @Test public void test_bareword_decimal() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "bareword_decimal.ttl"), true); } + @Test public void test_bareword_doubleNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "bareword_double.nt"), true); } + @Test public void test_bareword_double() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "bareword_double.ttl"), true); } + @Test public void test_bareword_integer() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "bareword_integer.ttl"), true); } + @Test public void test_blankNodePropertyList_as_objectNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "blankNodePropertyList_as_object.nt"), true); } + @Test public void test_blankNodePropertyList_as_object() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "blankNodePropertyList_as_object.ttl"), true); } + @Test public void test_blankNodePropertyList_as_subjectNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "blankNodePropertyList_as_subject.nt"), true); @@ -1527,46 +1874,57 @@ public class TurtleTests { public void test_blankNodePropertyList_containing_collectionNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "blankNodePropertyList_containing_collection.nt"), true); } + @Test public void test_blankNodePropertyList_containing_collection() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "blankNodePropertyList_containing_collection.ttl"), true); } + @Test public void test_blankNodePropertyList_with_multiple_triplesNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "blankNodePropertyList_with_multiple_triples.nt"), true); } + @Test public void test_blankNodePropertyList_with_multiple_triples() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "blankNodePropertyList_with_multiple_triples.ttl"), true); } + @Test public void test_collection_objectNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "collection_object.nt"), true); } + @Test public void test_collection_object() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "collection_object.ttl"), true); } + @Test public void test_collection_subjectNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "collection_subject.nt"), true); } + @Test public void test_collection_subject() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "collection_subject.ttl"), false); } + @Test public void test_comment_following_localName() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "comment_following_localName.ttl"), true); } + @Test public void test_comment_following_PNAME_NSNT() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "comment_following_PNAME_NS.nt"), true); } + @Test public void test_comment_following_PNAME_NS() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "comment_following_PNAME_NS.ttl"), false); } + @Test public void test__default_namespace_IRI() throws Exception { doTest(TestingUtilities.loadTestResource("turtle", "default_namespace_IRI.ttl"), true); diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/UtilitiesTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/UtilitiesTests.java index b074a0e9a..6307d11d2 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/UtilitiesTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/UtilitiesTests.java @@ -1,11 +1,6 @@ package org.hl7.fhir.r5.test; -import java.io.File; -import java.io.IOException; -import java.nio.file.Path; - import org.apache.commons.lang3.SystemUtils; - import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.xhtml.XhtmlComposer; import org.hl7.fhir.utilities.xhtml.XhtmlNode; @@ -14,6 +9,9 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import java.io.File; +import java.io.IOException; + public class UtilitiesTests { private static final String XHTML_SIMPLE = "
Some Text
"; @@ -108,7 +106,7 @@ public class UtilitiesTests { @Test public void testXhtmlLangAttributes() throws IOException { run(XHTML_SIMPLE); - run(XHTML_LANGS); + run(XHTML_LANGS); } public void run(String src) throws IOException { diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/ValidationTestConvertor.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/ValidationTestConvertor.java index e7589ebef..6e6cd34aa 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/ValidationTestConvertor.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/ValidationTestConvertor.java @@ -1,11 +1,5 @@ package org.hl7.fhir.r5.test; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; - import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.context.SimpleWorkerContext; import org.hl7.fhir.r5.elementmodel.Element; @@ -14,46 +8,51 @@ import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat; import org.hl7.fhir.r5.formats.IParser.OutputStyle; import org.hl7.fhir.utilities.Utilities; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; + public class ValidationTestConvertor { - /** - * @param args - * @throws FHIRException - * @throws IOException - * @throws FileNotFoundException - */ - public static void main(String[] args) throws FileNotFoundException, IOException, FHIRException { - SimpleWorkerContext context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip"); - for (File f : new File("C:\\work\\org.hl7.fhir\\build\\tests\\validation-examples").listFiles()) { - if (f.getAbsolutePath().endsWith(".xml")) { - File t = new File(Utilities.changeFileExt(f.getAbsolutePath(), ".ttl")); - if (!t.exists()) { - try { - System.out.print("Process "+f.getAbsolutePath()); - Element e = Manager.parse(context, new FileInputStream(f), FhirFormat.XML); - Manager.compose(context, e, new FileOutputStream(t), FhirFormat.TURTLE, OutputStyle.PRETTY, null); - System.out.println(" .... success"); - } catch (Exception e) { - System.out.println(" .... fail: "+e.getMessage()); - } - } - } - if (f.getAbsolutePath().endsWith(".json")) { - if (!new File(Utilities.changeFileExt(f.getAbsolutePath(), ".ttl")).exists()) { - File t = new File(Utilities.changeFileExt(f.getAbsolutePath(), ".ttl")); - if (!t.exists()) { - try { - System.out.print("Process "+f.getAbsolutePath()); - Element e = Manager.parse(context, new FileInputStream(f), FhirFormat.JSON); - Manager.compose(context, e, new FileOutputStream(t), FhirFormat.TURTLE, OutputStyle.PRETTY, null); - System.out.println(" .... success"); - } catch (Exception e) { - System.out.println(" .... fail: "+e.getMessage()); - } - } - } - } - } - } - + /** + * @param args + * @throws FHIRException + * @throws IOException + * @throws FileNotFoundException + */ + public static void main(String[] args) throws FileNotFoundException, IOException, FHIRException { + SimpleWorkerContext context = SimpleWorkerContext.fromPack("C:\\work\\org.hl7.fhir\\build\\publish\\validation-min.xml.zip"); + for (File f : new File("C:\\work\\org.hl7.fhir\\build\\tests\\validation-examples").listFiles()) { + if (f.getAbsolutePath().endsWith(".xml")) { + File t = new File(Utilities.changeFileExt(f.getAbsolutePath(), ".ttl")); + if (!t.exists()) { + try { + System.out.print("Process " + f.getAbsolutePath()); + Element e = Manager.parse(context, new FileInputStream(f), FhirFormat.XML); + Manager.compose(context, e, new FileOutputStream(t), FhirFormat.TURTLE, OutputStyle.PRETTY, null); + System.out.println(" .... success"); + } catch (Exception e) { + System.out.println(" .... fail: " + e.getMessage()); + } + } + } + if (f.getAbsolutePath().endsWith(".json")) { + if (!new File(Utilities.changeFileExt(f.getAbsolutePath(), ".ttl")).exists()) { + File t = new File(Utilities.changeFileExt(f.getAbsolutePath(), ".ttl")); + if (!t.exists()) { + try { + System.out.print("Process " + f.getAbsolutePath()); + Element e = Manager.parse(context, new FileInputStream(f), FhirFormat.JSON); + Manager.compose(context, e, new FileOutputStream(t), FhirFormat.TURTLE, OutputStyle.PRETTY, null); + System.out.println(" .... success"); + } catch (Exception e) { + System.out.println(" .... fail: " + e.getMessage()); + } + } + } + } + } + } }