diff --git a/s-pipes-core/src/test/java/cz/cvut/spin/SpinIntegrationTest.java b/s-pipes-core/src/test/java/cz/cvut/spin/SpinIntegrationTest.java index ec43157a..57ed01e7 100644 --- a/s-pipes-core/src/test/java/cz/cvut/spin/SpinIntegrationTest.java +++ b/s-pipes-core/src/test/java/cz/cvut/spin/SpinIntegrationTest.java @@ -1,4 +1,4 @@ -package cz.cvut.spin; + package cz.cvut.spin; import org.apache.jena.ontology.OntModelSpec; import org.apache.jena.query.QuerySolutionMap; @@ -35,6 +35,7 @@ public void executeSPINExpressionWithCustomSpinFunction() throws UnsupportedEnco //SPINModuleRegistry.get().init(); SPINModuleRegistry.get().registerAll(funcDefModel, null); + // load custom function call Model funcCallModel = ModelFactory.createDefaultModel(); @@ -59,4 +60,22 @@ public void executeSPINExpressionWithCustomSpinFunction() throws UnsupportedEnco assertEquals(node.toString(), repositoryUrl + "?default-graph-uri=" + URLEncoder.encode(reportGraphId, StandardCharsets.UTF_8) ); } + + @Test + public void executeQueryWithCustomJavaFunction() { + SPINModuleRegistry.get().init(); //TODO is it needed ? + + // make a query with AddDays function + String query = """ + @prefix kbss-timef: . + SELECT ?nextDay + WHERE { + BIND(kbss-timef:add-days("2022-01-01"^^xsd:date, 1) as ?nextDay) + } + """; + + // execute the query + + // check the result + } }