use of org.apache.jena.sparql.junit.QueryTestException in project jena by apache.
the class QueryTestSDBFactory method makeTest.
@Override
public Test makeTest(Resource manifest, Resource entry, String testName, Resource action, Resource result) {
// Defaults.
Syntax querySyntax = getQuerySyntax(manifest);
if (testRootName != null)
testName = testRootName + testName;
if (querySyntax != null) {
if (!querySyntax.equals(Syntax.syntaxARQ) && !querySyntax.equals(Syntax.syntaxSPARQL))
throw new QueryTestException("Unknown syntax: " + querySyntax);
}
TestItem testItem = TestItem.create(entry, TestManifestX.TestQuery);
TestCase test = null;
if (testItem.getTestType().equals(TestManifestX.TestQuery))
test = new QueryTestSDB(storeDesc, testName, results, testItem);
if (testItem.getTestType().equals(TestManifestX.TestSurpressed))
test = new SurpressedTest(testName, results, testItem);
if (test == null)
System.err.println("Unrecognized test type: " + testItem.getTestType());
Resource action2 = testItem.getAction();
if (action2.hasProperty(TestManifestX.option))
System.out.println("OPTION");
return test;
}
Aggregations