Add a test case for re-embeeding a single subject
authorJosh Mandel <joshua.mandel@childrens.harvard.edu>
Wed, 09 May 2012 17:42:51 -0700
changeset 639 08c8d6a72513
parent 638 62b188959ded
child 640 1201e6f278b0
Add a test case for re-embeeding a single subject
test-suite/tests/frame-0019-frame.jsonld
test-suite/tests/frame-0019-in.jsonld
test-suite/tests/frame-0019-out.jsonld
test-suite/tests/frame-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/frame-0019-frame.jsonld	Wed May 09 17:42:51 2012 -0700
@@ -0,0 +1,6 @@
+{
+  "@context": {
+    "ex": "http://example.org/terms#"
+  },
+  "@type": "ex:Node"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/frame-0019-in.jsonld	Wed May 09 17:42:51 2012 -0700
@@ -0,0 +1,20 @@
+{
+  "@context": {
+    "ex": "http://example.org/terms#",
+    "ex:sees": {
+      "@type": "@id"
+    }
+  },
+  "@graph": [
+  {
+    "@id": "ex:node1",
+    "@type": "ex:Node",
+    "ex:sees": "ex:node2",
+    "ex:color": "blue"
+  }, {
+    "@id": "ex:node2",
+    "@type": "ex:Node",
+    "ex:sees": "ex:node1",
+    "ex:color": "red"
+  }]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/frame-0019-out.jsonld	Wed May 09 17:42:51 2012 -0700
@@ -0,0 +1,31 @@
+{
+    "@context": {
+        "ex": "http://example.org/terms#"
+    },
+    "@graph": [{
+        "@id": "ex:node1",
+        "@type": "ex:Node",
+        "ex:color": "blue",
+        "ex:sees": {
+            "@id": "ex:node2",
+            "@type": "ex:Node",
+            "ex:sees": {
+                "@id": "ex:node1"
+            },
+            "ex:color": "red"
+        }
+    }, {
+        "@id": "ex:node2",
+        "@type": "ex:Node",
+        "ex:color": "red",
+        "ex:sees": {
+            "@id": "ex:node1",
+            "@type": "ex:Node",
+            "ex:sees": {
+                "@id": "ex:node2"
+            },
+            "ex:color": "blue"
+        }
+    }]
+}
+
--- a/test-suite/tests/frame-manifest.jsonld	Tue May 08 18:08:52 2012 -0400
+++ b/test-suite/tests/frame-manifest.jsonld	Wed May 09 17:42:51 2012 -0700
@@ -112,5 +112,11 @@
       "input": "frame-0018-in.jsonld",
       "frame": "frame-0018-frame.jsonld",
       "expect": "frame-0018-out.jsonld"
+   }, {
+      "@type": ["test:TestCase", "jld:FrameTest"],
+      "name": "Resources can be re-embedded again in each top-level frame match",
+      "input": "frame-0019-in.jsonld",
+      "frame": "frame-0019-frame.jsonld",
+      "expect": "frame-0019-out.jsonld"
    }]
 }