AKSW / RDFUnit

An RDF Unit Testing Suite
http://RDFUnit.aksw.org
Apache License 2.0
155 stars 40 forks source link

Question: number of instances for a given class rule #97

Open m1ci opened 5 years ago

m1ci commented 5 years ago

Is it possible to implement in SHACL/RDFUnit a validaiton rule that in the graph there must be 8 instances of some class? Thanks!

jimkont commented 5 years ago

I don't think this can be done in SHACL but in the RDFUnit test case format you can put any SPARQL query and that should be easily implemented

m1ci commented 5 years ago

ok, thanks for the info. Can you please provide a pointer to some hello world example of an RDFUnit test case?

gcpdev commented 5 years ago

ok, thanks for the info. Can you please provide a pointer to some hello world example of an RDFUnit test case?

Here are some example tests that includes SPARQL queries:

https://github.com/dbpedia/ontology-tracker/blob/master/guidelines/dbo.tests.shapes.ttl

jimkont commented 5 years ago

there are many examples in the rdfunit-manual module as well. e.g. for nif