You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2014/08/06 09:24:59 UTC

git commit: [OLINGO-392] JS - read OData V4 service document

Repository: olingo-odata4-js
Updated Branches:
  refs/heads/olingo392 46937a7af -> c4be2ecfe


[OLINGO-392] JS - read OData V4 service document


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/commit/c4be2ecf
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/c4be2ecf
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/c4be2ecf

Branch: refs/heads/olingo392
Commit: c4be2ecfeddaa5246893f5077c84c840d02fc019
Parents: 46937a7
Author: challenh <ch...@microsoft.com>
Authored: Wed Aug 6 15:23:49 2014 +0800
Committer: challenh <ch...@microsoft.com>
Committed: Wed Aug 6 15:23:49 2014 +0800

----------------------------------------------------------------------
 datajs/tests/odata-request-functional-tests.js | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/c4be2ecf/datajs/tests/odata-request-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-request-functional-tests.js b/datajs/tests/odata-request-functional-tests.js
index f20475d..860b23d 100644
--- a/datajs/tests/odata-request-functional-tests.js
+++ b/datajs/tests/odata-request-functional-tests.js
@@ -393,6 +393,23 @@
                         });
                     }, unexpectedErrorHandler);
                 }, "Delete entity from " + serviceName + " service using mimeType = " + mimeType + " and DSV = " + dataServiceVersion, headers);
+
+                djstest.addTest(function readServiceDocument(headers) {
+                    var endpoint = testServices.V4;
+                    OData.request({
+                        requestUri: endpoint,
+                        method: "GET",
+                        headers: headers
+                    }, function (data, response) {
+                        djstest.assertAreEqual(data.value[0].name, "Categories", "Verify .name");
+                        djstest.assertAreEqual(data.value[0].kind, "EntitySet", "Verify .kind");
+                        djstest.assertAreEqual(data.value[0].url, "Categories", "Verify .url");
+
+                        djstest.assertAreEqual(data.value[1].name, "Foods", "Verify .name");
+                        djstest.assertAreEqual(data.value[1].kind, "EntitySet", "Verify .kind");
+                        djstest.assertAreEqual(data.value[1].url, "Foods", "Verify .url");
+                    }, unexpectedErrorHandler);
+                }, "Read service document from " + serviceName + " service using mimeType = " + mimeType + " and DSV = " + dataServiceVersion, headers);
             });
         });
     });