Skip to content

Commit

Permalink
Test Object -- #202 #233
Browse files Browse the repository at this point in the history
  • Loading branch information
enridaga committed Mar 23, 2022
1 parent 6062644 commit cc9b839
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public MoreJSONTriplifierTest() {
}
@Override
protected void properties(Properties properties) {

// SliceArray
if(name.getMethodName().equals("testSliceArray$1")){
properties.setProperty("blank-nodes", "false");
// properties.setProperty("slice", "true");
Expand All @@ -48,17 +50,21 @@ protected void properties(Properties properties) {
properties.setProperty("blank-nodes", "false");
// properties.setProperty("slice", "true");
properties.setProperty("json.path", "$.*");
}else if(name.getMethodName().equals("testSliceArray_2$1")){
}
// SliceArray_2
if(name.getMethodName().equals("testSliceArray_2$1")){
properties.setProperty("blank-nodes", "false");
// properties.setProperty("slice", "true");
}else if(name.getMethodName().equals("testSliceArray_2$2")){
properties.setProperty("blank-nodes", "false");
properties.setProperty("slice", "true");
}else if(name.getMethodName().equals("testSliceArray_2$3")){
} else if(name.getMethodName().equals("testSliceArray_2$3")){
properties.setProperty("blank-nodes", "false");
properties.setProperty("slice", "true");
properties.setProperty("json.path", "$.*");
}else if(name.getMethodName().equals("testValueTypes_1$1")){
}
// ValueTypes
if(name.getMethodName().equals("testValueTypes_1$1")){
properties.setProperty("blank-nodes", "false");
//properties.setProperty("slice", "true");
}else if(name.getMethodName().equals("testValueTypes_1$2")){
Expand All @@ -69,6 +75,11 @@ protected void properties(Properties properties) {
properties.setProperty("slice", "true");
properties.setProperty("json.path", "$.*");
}
// Object
if(name.getMethodName().equals("testObject$1")){
properties.setProperty("blank-nodes", "false");
// properties.setProperty("slice", "true");
}
}

@Test
Expand Down Expand Up @@ -148,4 +159,12 @@ protected void properties(Properties properties) {
//RDFDataMgr.write(System.err, result, Lang.N3);
assertResultIsIsomorphicWithExpected();
}

@Test
public void testObject$1(){
L.info("Test simple Json object (one go)");
//RDFDataMgr.write(System.err, result, Lang.N3);
assertResultIsIsomorphicWithExpected();
}

}
1 change: 1 addition & 0 deletions sparql-anything-json/src/test/resources/Object.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"letter" : "A", "number": 1, "boolean": true}
7 changes: 7 additions & 0 deletions sparql-anything-json/src/test/resources/Object.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix fx: <http://sparql.xyz/facade-x/ns/>.
@prefix xyz: <http://sparql.xyz/facade-x/data/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.

<http://www.example.org/document> a fx:root ; xyz:letter "A" ; xyz:number "1"^^xsd:int ; ; xyz:boolean true .

0 comments on commit cc9b839

Please # to comment.