Add property generator round tripping test based on Drupal's content syndication use case
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 13 Dec 2012 19:17:51 +0100
changeset 1036 db21172b1b0f
parent 1035 17f0ba1e50a0
child 1037 8c4133b9be73
Add property generator round tripping test based on Drupal's content syndication use case

This addresses #142 and #160.
test-suite/tests/compact-0037-context.jsonld
test-suite/tests/compact-0037-in.jsonld
test-suite/tests/compact-0037-out.jsonld
test-suite/tests/compact-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0037-context.jsonld	Thu Dec 13 19:17:51 2012 +0100
@@ -0,0 +1,23 @@
+{
+  "@context": {
+    "site": "http://example.com/",
+    "site-syn": "site:site-schema/syndication/",
+    "schema": "http://schema.org/",
+    "title": {
+      "@id": [ "site-syn:node/article/title", "schema:name" ],
+      "@container": "@set"
+    },
+    "body_value": {
+      "@id": [ "site-syn:node/article/body/value", "schema:articleBody" ],
+      "@container": "@set"
+    },
+    "body_summary": {
+      "@id": [ "site-syn:node/article/body/summary", "schema:description" ],
+      "@container": "@set"
+    },
+    "field_tags": {
+      "@id": [ "site-syn:node/article/field_tags", "schema:about" ],
+      "@container": "@set"
+    }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0037-in.jsonld	Thu Dec 13 19:17:51 2012 +0100
@@ -0,0 +1,37 @@
+{
+  "@context": {
+    "site": "http://example.com/",
+    "site-syn": "site:site-schema/syndication/",
+    "schema": "http://schema.org/",
+    "title": {
+      "@id": [ "site-syn:node/article/title", "schema:name" ],
+      "@container": "@set"
+    },
+    "body_value": {
+      "@id": [ "site-syn:node/article/body/value", "schema:articleBody" ],
+      "@container": "@set"
+    },
+    "body_summary": {
+      "@id": [ "site-syn:node/article/body/summary", "schema:description" ],
+      "@container": "@set"
+    },
+    "field_tags": {
+      "@id": [ "site-syn:node/article/field_tags", "schema:about" ],
+      "@container": "@set"
+    }
+  },
+  "title": [
+    "This is the title in English"
+  ],
+  "body_value": [
+    "This is the body value in English."
+  ],
+  "body_summary": [
+    "This is the teaser for the body value."
+  ],
+  "field_tags": [
+    {
+      "@id": "site:taxonomy/term/1"
+    }
+  ]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0037-out.jsonld	Thu Dec 13 19:17:51 2012 +0100
@@ -0,0 +1,37 @@
+{
+  "@context": {
+    "site": "http://example.com/",
+    "site-syn": "site:site-schema/syndication/",
+    "schema": "http://schema.org/",
+    "title": {
+      "@id": [ "site-syn:node/article/title", "schema:name" ],
+      "@container": "@set"
+    },
+    "body_value": {
+      "@id": [ "site-syn:node/article/body/value", "schema:articleBody" ],
+      "@container": "@set"
+    },
+    "body_summary": {
+      "@id": [ "site-syn:node/article/body/summary", "schema:description" ],
+      "@container": "@set"
+    },
+    "field_tags": {
+      "@id": [ "site-syn:node/article/field_tags", "schema:about" ],
+      "@container": "@set"
+    }
+  },
+  "title": [
+    "This is the title in English"
+  ],
+  "body_value": [
+    "This is the body value in English."
+  ],
+  "body_summary": [
+    "This is the teaser for the body value."
+  ],
+  "field_tags": [
+    {
+      "@id": "site:taxonomy/term/1"
+    }
+  ]
+}
--- a/test-suite/tests/compact-manifest.jsonld	Thu Dec 13 18:37:27 2012 +0100
+++ b/test-suite/tests/compact-manifest.jsonld	Thu Dec 13 19:17:51 2012 +0100
@@ -222,5 +222,11 @@
     "input": "compact-0036-in.jsonld",
     "context": "compact-0036-context.jsonld",
     "expect": "compact-0036-out.jsonld"
+  }, {
+    "@type": ["test:TestCase", "jld:CompactTest"],
+    "name": "Property generator round-tripping (Drupal content syndication)",
+    "input": "compact-0037-in.jsonld",
+    "context": "compact-0037-context.jsonld",
+    "expect": "compact-0037-out.jsonld"
   }]
 }