@prefix test: <http://www.w3.org/2006/03/test-description#> .
@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . 
@base <http://www.w3.org/2001/sw/rdb2rdf/test-cases/#> .

<d012> a rdb2rdftest:DataBase;
	dcterms:title "Two tables, two duplicate records, zero nulls, no primary key" ;
	dcterms:identifier "D012-2tables2duplicates0nulls" ;
	rdb2rdftest:sqlScriptFile "create.sql";
	rdb2rdftest:relatedTestCase <dg0012>, <tc0012a>, <tc0012b>, <tc0012c>, <tc0012d>, <tc0012e> ;
.

<dg0012> a rdb2rdftest:DirectMapping ;	
	dcterms:title "Generation of direct graph from a database without primary keys"; 
	dcterms:identifier "DirectGraphTC0012" ;
	test:purpose "Test the generation of direct graph from a database without primary keys, by creating subject BlankNodes" ;
	test:specificationReference "#no-pk" ;
	test:reviewStatus test:unreviewed ;
	rdb2rdftest:database <d012> ;
	rdb2rdftest:hasExpectedOutput true ;	
	rdb2rdftest:output "directGraph.ttl" ;
.
<tc0012a> a rdb2rdftest:R2RML ;	
	dcterms:title "Duplicate tuples generate same blank node" ; 
	dcterms:identifier "R2RMLTC0012a" ;
	test:purpose "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent." ;
	test:specificationReference "#blank-nodes" ;
	test:reviewStatus test:unreviewed ;
	rdb2rdftest:database <d012> ;
	rdb2rdftest:hasExpectedOutput true ;
	rdb2rdftest:output "mappeda.nq" ;
	rdb2rdftest:mappingDocument "r2rmla.ttl" ;
.

<tc0012b> a rdb2rdftest:R2RML ;	
	dcterms:title "Duplicate tuples generate same blank node" ; 
	dcterms:identifier "R2RMLTC0012b" ;
	test:purpose "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent." ;
	test:specificationReference "#blank-nodes" ;
	test:reviewStatus test:unreviewed ;
	rdb2rdftest:database <d012> ;
	rdb2rdftest:hasExpectedOutput true ;	
	rdb2rdftest:output "mappedb.nq" ;
	rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
.

<tc0012c> a rdb2rdftest:R2RML ;	
	dcterms:title "TriplesMap without subjectMap" ; 
	dcterms:identifier "R2RMLTC0012c" ;
	test:purpose "Tests a R2RML with missing information, TriplesMap without subjectMap." ;
	test:specificationReference "#dfn-template-valued-term-map" ;
	test:reviewStatus test:unreviewed ;
	rdb2rdftest:database <d012> ;
	rdb2rdftest:hasExpectedOutput false ;
	rdb2rdftest:failMessage "non-conforming R2RML mapping";	
	rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
.

<tc0012d> a rdb2rdftest:R2RML ;	
	dcterms:title "TriplesMap with two subjectMap" ; 
	dcterms:identifier "R2RMLTC0012d" ;
	test:purpose "Tests a R2RML with wrong information, TriplesMap with two subjectMap." ;
	test:specificationReference "#dfn-template-valued-term-map" ;
	test:reviewStatus test:unreviewed ;
	rdb2rdftest:database <d012> ;
	rdb2rdftest:hasExpectedOutput false ;
	rdb2rdftest:failMessage "non-conforming R2RML mapping";		
	rdb2rdftest:mappingDocument "r2rmld.ttl" ;
.

<tc0012e> a rdb2rdftest:R2RML ;	
	dcterms:title "Default mapping" ; 
	dcterms:identifier "R2RMLTC0012e" ;
	test:purpose "Tests the generation of a default mapping for tables without a primary key." ;
	test:specificationReference "#default-mappings" ;
	test:reviewStatus test:unreviewed ;
	rdb2rdftest:database <d012> ;
	rdb2rdftest:hasExpectedOutput true ;
	rdb2rdftest:output "mappede.nq" ;	
	rdb2rdftest:mappingDocument "r2rmle.ttl" ;
.
