Add test nested properties using @list-containers
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 20 Aug 2012 17:33:46 +0200
changeset 838 5fadaa9a07d1
parent 837 fac887470979
child 839 4084adc6c60e
Add test nested properties using @list-containers

This addresses #143.
test-suite/tests/compact-0022-context.jsonld
test-suite/tests/compact-0022-in.jsonld
test-suite/tests/compact-0022-out.jsonld
test-suite/tests/compact-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0022-context.jsonld	Mon Aug 20 17:33:46 2012 +0200
@@ -0,0 +1,10 @@
+{
+  "@context": {
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    "ex": "https://example.org/ns#",
+    "id": "@id",
+    "type": "@type",
+    "ex:properties": { "@container": "@list" }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0022-in.jsonld	Mon Aug 20 17:33:46 2012 +0200
@@ -0,0 +1,39 @@
+[
+  {
+    "@id": "https://example.org/ns#Game",
+    "@type": [
+      "http://www.w3.org/2002/07/owl#Class"
+    ],
+    "https://example.org/ns#properties": [
+      {
+        "@list": [
+          {
+            "@id": "https://example.org/ns#title"
+          },
+          {
+            "@id": "https://example.org/ns#slug"
+          }
+        ]
+      }
+    ]
+  },
+  {
+    "@id": "https://example.org/ns#properties",
+    "@type": [
+      "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"
+    ]
+  },
+  {
+    "@id": "https://example.org/ns#slug",
+    "@type": [
+      "http://www.w3.org/2002/07/owl#DataProperty",
+      "http://www.w3.org/2002/07/owl#FunctionalProperty"
+    ]
+  },
+  {
+    "@id": "https://example.org/ns#title",
+    "@type": [
+      "http://www.w3.org/2002/07/owl#DataProperty"
+    ]
+  }
+]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0022-out.jsonld	Mon Aug 20 17:33:46 2012 +0200
@@ -0,0 +1,40 @@
+{
+  "@context": {
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    "ex": "https://example.org/ns#",
+    "id": "@id",
+    "type": "@type",
+    "ex:properties": {
+        "@container": "@list"
+    }
+  },
+  "@graph": [
+    {
+      "id": "ex:Game",
+      "type": "owl:Class",
+      "ex:properties": [
+        {
+          "id": "ex:title",
+          "type": "owl:DataProperty"
+        },
+        {
+          "id": "ex:slug",
+          "type": [ "owl:DataProperty", "owl:FunctionalProperty" ]
+        }
+      ]
+    },
+    {
+      "id": "ex:properties",
+      "type": "rdf:Property"
+    },
+    {
+      "id": "ex:slug",
+      "type": [ "owl:DataProperty", "owl:FunctionalProperty" ]
+    },
+    {
+      "id": "ex:title",
+      "type": "owl:DataProperty"
+    }
+  ]
+}
--- a/test-suite/tests/compact-manifest.jsonld	Mon Aug 20 15:58:12 2012 +0200
+++ b/test-suite/tests/compact-manifest.jsonld	Mon Aug 20 17:33:46 2012 +0200
@@ -132,5 +132,11 @@
     "input": "compact-0021-in.jsonld",
     "context": "compact-0021-context.jsonld",
     "expect": "compact-0021-out.jsonld"
+  }, {
+    "@type": ["test:TestCase", "jld:CompactTest"],
+    "name": "Compact nested properties using @list containers",
+    "input": "compact-0022-in.jsonld",
+    "context": "compact-0022-context.jsonld",
+    "expect": "compact-0022-out.jsonld"
   }]
 }