Skip to content

Commit

Permalink
Add issue #198 test
Browse files Browse the repository at this point in the history
  • Loading branch information
filip26 committed Dec 12, 2021
1 parent 67f1469 commit 8e31e6a
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"@context":{
"@base":"http://leanix.net/",
"col":"https://adidas-dev.collibra.com/",
"type":"@type",
"id":"@id",
"data":"col:ignore",
"allFactSheets":{
"@reverse":"col:assets_in_domain_relation",
"@container":"@index"
},
"edges":"@nest",
"displayName":{
"@id":"col:displayname",
"@type":"xsd:string"
},

"DataObject":"col:00000000-0000-0000-0000-000000031026",

"node" : "@nest",
"relApplicationToDataObject" : {
"@id" : "col:relates",
"@container" : "@index",
"@context" : {
"factSheet" : "col:to",
"RelApplicationToDataObject" : "col:1099a85a-48c4-4d34-996e-07f63bc0034e"
}
}
}
}
26 changes: 26 additions & 0 deletions src/test/resources/com/apicatalog/jsonld/test/issue198-frame.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"@context":{
"@base":"http://leanix.net/",
"col":"https://adidas-dev.collibra.com/",
"type":"@type",
"id":"@id",
"data":"col:ignore",
"allFactSheets":{
"@reverse":"col:assets_in_domain_relation"
},
"displayName":{
"@id":"col:displayname",
"@type":"xsd:string"
},

"DataObject":"col:00000000-0000-0000-0000-000000031026",

"relation" : "col:relates",
"from" : "col:from",
"to" : "col:to"
},
"data":{
"type" : {"@default" : "col:2cc7d681-42bd-4a1d-ab85-7b5386f0c71a"},
"allFactSheets":{}
}
}
33 changes: 33 additions & 0 deletions src/test/resources/com/apicatalog/jsonld/test/issue198-in.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"@context" : "issue198-context.json",
"data": {
"allFactSheets": {
"edges": [
{
"node": {
"id": "ec254751-86be-4b7d-82b8-b716bedb87ce",
"displayName": "#MYBEST",
"type": "Application",
"qualitySeal": "APPROVED",
"relApplicationToDataObject": {
"edges": [
{
"node": {
"type": "RelApplicationToDataObject",
"id": "9a8fb137-0a53-4c95-adbb-d9f8bd27b2bc",
"factSheet": {
"id": "338b1d1d-617d-4ee4-b79f-dee72e265831",
"displayName": "IT Landscape Meta Data",
"type": "DataObject"
}
}
}
]
}
}
}
]
}
},
"errors": null
}
41 changes: 41 additions & 0 deletions src/test/resources/com/apicatalog/jsonld/test/issue198-out.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"@graph": [
{
"@id": "_:b0",
"https://adidas-dev.collibra.com/ignore": {
"@id": "_:b1"
}
},
{
"@id": "http://leanix.net/338b1d1d-617d-4ee4-b79f-dee72e265831",
"@type": "https://adidas-dev.collibra.com/00000000-0000-0000-0000-000000031026",
"https://adidas-dev.collibra.com/displayname": {
"@type": "xsd:string",
"@value": "IT Landscape Meta Data"
}
},
{
"@id": "http://leanix.net/9a8fb137-0a53-4c95-adbb-d9f8bd27b2bc",
"@index": "edges",
"@type": "https://adidas-dev.collibra.com/1099a85a-48c4-4d34-996e-07f63bc0034e",
"https://adidas-dev.collibra.com/to": {
"@id": "http://leanix.net/338b1d1d-617d-4ee4-b79f-dee72e265831"
}
},
{
"@id": "http://leanix.net/ec254751-86be-4b7d-82b8-b716bedb87ce",
"@index": "edges",
"@type": "http://leanix.net/Application",
"https://adidas-dev.collibra.com/assets_in_domain_relation": {
"@id": "_:b1"
},
"https://adidas-dev.collibra.com/displayname": {
"@type": "xsd:string",
"@value": "#MYBEST"
},
"https://adidas-dev.collibra.com/relates": {
"@id": "http://leanix.net/9a8fb137-0a53-4c95-adbb-d9f8bd27b2bc"
}
}
]
}
9 changes: 9 additions & 0 deletions src/test/resources/com/apicatalog/jsonld/test/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@
"input": "issue179-in.nq",
"expect": "issue179-out.json",
"option": { "useNativeTypes": true }
},
{
"@id": "#t0013",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
"name": "Issue #198: @reverse in @context",
"input": "issue198-in.json",
"expect": "issue198-out.json",
"frame": "issue198-frame.json",
"option": { "expandContext" : "issue198-context.json", "base": "http://leanix.net/" }
}
]
}

0 comments on commit 8e31e6a

Please sign in to comment.