Skip to content

Commit 46490f2

Browse files
Added test case for no-values scenario
1 parent 13cdee3 commit 46490f2

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

shacl12-test-suite/tests/core/node/manifest.ttl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
mf:include <uniqueValuesFor-001.ttl> ;
4747
mf:include <uniqueValuesFor-002.ttl> ;
4848
mf:include <uniqueValuesFor-003.ttl> ;
49+
mf:include <uniqueValuesFor-004.ttl> ;
4950
mf:include <xone-001.ttl> ;
5051
mf:include <xone-duplicate.ttl> ;
5152
mf:include <qualified-001.ttl> ;

shacl12-test-suite/tests/core/node/uniqueValuesFor-002.ttl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@
99

1010
ex:TestShape
1111
rdf:type sh:NodeShape ;
12-
sh:targetClass ex:TestShape ;
12+
sh:targetClass ex:Concept ;
1313
sh:uniqueValuesFor ( skos:notation skos:inScheme ) ;
1414
.
1515
ex:ValidInstance1
16-
rdf:type ex:TestShape ;
16+
rdf:type ex:Concept ;
1717
skos:notation "A1" ;
1818
skos:inScheme ex:Scheme1 ;
1919
.
2020
ex:ValidInstance2
21-
rdf:type ex:TestShape ;
21+
rdf:type ex:Concept ;
2222
skos:notation "A2" ;
2323
skos:inScheme ex:Scheme1 ;
2424
.
2525
ex:InvalidInstance1
26-
rdf:type ex:TestShape ;
26+
rdf:type ex:Concept ;
2727
skos:notation "A1" ;
2828
skos:inScheme ex:Scheme2 ;
2929
.
3030
ex:InvalidInstance2
31-
rdf:type ex:TestShape ;
31+
rdf:type ex:Concept ;
3232
skos:notation "A1" ;
3333
skos:inScheme ex:Scheme2 ;
3434
.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@prefix ex: <http://example.com/ns#> .
2+
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
3+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
5+
@prefix sh: <http://www.w3.org/ns/shacl#> .
6+
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
7+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
8+
9+
ex:TestShape
10+
rdf:type sh:NodeShape ;
11+
sh:targetClass ex:TestClass ;
12+
sh:uniqueValuesFor ex:id ;
13+
.
14+
ex:ValidInstance1
15+
a ex:TestClass ;
16+
.
17+
ex:ValidInstance2
18+
a ex:TestClass ;
19+
.
20+
<>
21+
rdf:type mf:Manifest ;
22+
mf:entries (
23+
<uniqueValuesFor-004>
24+
) ;
25+
.
26+
<uniqueValuesFor-004>
27+
rdf:type sht:Validate ;
28+
rdfs:label "Test of sh:uniqueValuesFor at node shape 004 (No violation if values missing)" ;
29+
mf:action [
30+
sht:dataGraph <> ;
31+
sht:shapesGraph <> ;
32+
] ;
33+
mf:result [
34+
rdf:type sh:ValidationReport ;
35+
sh:conforms "true"^^xsd:boolean ;
36+
] ;
37+
mf:status sht:approved ;
38+
.

0 commit comments

Comments
 (0)