Skip to content

Commit

Permalink
chore: add extra test case for nested nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr committed Jan 2, 2023
1 parent 7900c5b commit e5daef3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
15 changes: 15 additions & 0 deletions __tests__/valid/nestedShape3.shaclc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
BASE <http://example.org/nestedShape>

PREFIX ex: <http://example.org/test#>

shape ex:TestShape {
ex:property IRI {
ex:nestedProperty [1..1] .
} .
ex:property2 IRI {
ex:nestedProperty2 [1..1] .
ex:property3 IRI {
ex:nestedProperty3 [1..1] .
} .
} .
}
48 changes: 48 additions & 0 deletions __tests__/valid/nestedShape3.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@base <http://example.org/nestedShape> .
@prefix ex: <http://example.org/test#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@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#> .

<>
a owl:Ontology ;
.

ex:TestShape
a sh:NodeShape ;
sh:property [
sh:path ex:property ;
sh:nodeKind sh:IRI ;
sh:node [
sh:property [
sh:path ex:nestedProperty ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
] ;
] ;
sh:property [
sh:path ex:property2 ;
sh:nodeKind sh:IRI ;
sh:node [
sh:property [
sh:path ex:nestedProperty2 ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path ex:property3 ;
sh:nodeKind sh:IRI ;
sh:node [
sh:property [
sh:path ex:nestedProperty3 ;
sh:minCount 1 ;
sh:maxCount 1 ;
]
]
] ;
] ;
] ;
.

0 comments on commit e5daef3

Please sign in to comment.