diff --git a/tests/cases/single_shape/README.md b/tests/cases/single_shape/README.md index 233f8f5..9132663 100644 --- a/tests/cases/single_shape/README.md +++ b/tests/cases/single_shape/README.md @@ -1,6 +1,6 @@ # Test Cases with a Single Shape -The test cases with a single shape consider the instances of the class `ClassA`. +The test cases with a single shape consider the instances of the class `ClassA` except for case 9 which is testing a shape that has no matching instances in the data. The following cases are tested: 1. One constraint with a minimal cardinality of `1` @@ -11,3 +11,4 @@ The following cases are tested: 6. Combination of two min constraints 7. Combination of two max constraints 8. Shape without constraints +9. Shape without any matching instances in the data diff --git a/tests/cases/single_shape/case9/definitions/case9.json b/tests/cases/single_shape/case9/definitions/case9.json new file mode 100644 index 0000000..c1da8c1 --- /dev/null +++ b/tests/cases/single_shape/case9/definitions/case9.json @@ -0,0 +1,7 @@ +{ + "schemaDir": "./tests/cases/single_shape/case9/shapes/", + "groundTruth": { + "valid": [], + "invalid": [] + } +} diff --git a/tests/cases/single_shape/case9/shapes/ClassX.json b/tests/cases/single_shape/case9/shapes/ClassX.json new file mode 100644 index 0000000..96ef20d --- /dev/null +++ b/tests/cases/single_shape/case9/shapes/ClassX.json @@ -0,0 +1,17 @@ +{ + "name": "ClassX", + "targetDef": { + "query": "SELECT ?x WHERE { ?x a test:ClassX }", + "class": "test:ClassX" + }, + "prefix": { + "test": "" + }, + "constraintDef": { + "conjunctions": [ + [ + { "path": "test:property0", "min": 1 } + ] + ] + } +} diff --git a/tests/cases/single_shape/case9/shapes/ClassX.ttl b/tests/cases/single_shape/case9/shapes/ClassX.ttl new file mode 100644 index 0000000..c8b9c1f --- /dev/null +++ b/tests/cases/single_shape/case9/shapes/ClassX.ttl @@ -0,0 +1,10 @@ +@prefix sh: . +@prefix test: . +@prefix : . + +:ClassX a sh:NodeShape; + sh:targetClass test:ClassX ; + sh:property [ + sh:path test:property0 ; + sh:minCount 1 + ] .