JENA-1797: Test for instance of subclass of implicit target
diff --git a/jena-shacl/src/test/resources/local/additional/target-class-subclass-1.ttl b/jena-shacl/src/test/resources/local/additional/target-class-subclass-1.ttl
new file mode 100644
index 0000000..f0c668e
--- /dev/null
+++ b/jena-shacl/src/test/resources/local/additional/target-class-subclass-1.ttl
@@ -0,0 +1,51 @@
+PREFIX ex: <http://example/>
+
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+
+PREFIX sh: <http://www.w3.org/ns/shacl#>
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+
+PREFIX sht: <http://www.w3.org/ns/shacl-test#>
+PREFIX mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>
+
+ex:A rdf:type rdfs:Class .
+
+ex:B #rdf:type rdfs:Class ;
+ rdfs:subClassOf ex:A .
+
+ex:x rdf:type ex:B .
+
+ex:ShapeDef
+ rdf:type sh:NodeShape ;
+ sh:targetClass ex:A;
+ sh:property [
+ sh:path rdfs:label ;
+ sh:minCount 1 ;
+ ] .
+
+<>
+ rdf:type mf:Manifest ;
+ mf:entries ( <target-class-subclass-1> )
+ .
+
+<target-class-subclass-1>
+ rdf:type sht:Validate ;
+ rdfs:label "Instance of implicit class target and subclass test" ;
+ mf:action [
+ sht:dataGraph <> ;
+ sht:shapesGraph <> ;
+ ] ;
+ mf:result [
+ rdf:type sh:ValidationReport ;
+ sh:conforms false ;
+ sh:result [
+ rdf:type sh:ValidationResult ;
+ sh:focusNode ex:x ;
+ sh:resultMessage "minCount[1]: Invalid cardinality: expected min 1: Got count = 0" ;
+ sh:resultPath rdfs:label ;
+ sh:resultSeverity sh:Violation ;
+ sh:sourceConstraintComponent sh:MinCountConstraintComponent ;
+ sh:sourceShape []
+ ]
+ ] .
diff --git a/jena-shacl/src/test/resources/local/manifest.ttl b/jena-shacl/src/test/resources/local/manifest.ttl
index bb465b6..45479b7 100644
--- a/jena-shacl/src/test/resources/local/manifest.ttl
+++ b/jena-shacl/src/test/resources/local/manifest.ttl
@@ -11,4 +11,5 @@
rdf:type mf:Manifest ;
mf:include <additional/lang-simple-1.ttl> ;
mf:include <additional/implicit-subclass-1.ttl> ;
+ mf:include <additional/target-class-subclass-1.ttl> ;
.