You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ko...@apache.org on 2014/05/23 14:28:02 UTC

git commit: OLINGO-238] adopt tests/odata-atom-tests.js tests/odata-batch-tests.js

Repository: olingo-odata4-js
Updated Branches:
  refs/heads/master cfc5d280a -> 0c2def207


OLINGO-238] adopt tests/odata-atom-tests.js tests/odata-batch-tests.js


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/0c2def20
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/0c2def20
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/0c2def20

Branch: refs/heads/master
Commit: 0c2def207adb036b9371d77a57b077e7cb87cc1d
Parents: cfc5d28
Author: Sven Kobler <sv...@sap.com>
Authored: Fri May 23 14:27:42 2014 +0200
Committer: Sven Kobler <sv...@sap.com>
Committed: Fri May 23 14:27:42 2014 +0200

----------------------------------------------------------------------
 datajs/Gruntfile.js                |  1 +
 datajs/tests/odata-atom-tests.js   | 26 +++++++++++-----------
 datajs/tests/odata-batch-tests.js  | 38 ++++++++++++++++-----------------
 datajs/tests/odata-qunit-tests.htm |  6 +++---
 4 files changed, 36 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/0c2def20/datajs/Gruntfile.js
----------------------------------------------------------------------
diff --git a/datajs/Gruntfile.js b/datajs/Gruntfile.js
index 0dabb0f..853c53b 100644
--- a/datajs/Gruntfile.js
+++ b/datajs/Gruntfile.js
@@ -87,6 +87,7 @@ module.exports = function(grunt) {
           hostname: "localhost",
           base: "",
           keepalive : true,
+          //changeOrigin: true,
           middleware: function (connect, options) {
             return [
               require("grunt-connect-proxy/lib/utils").proxyRequest ,

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/0c2def20/datajs/tests/odata-atom-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-atom-tests.js b/datajs/tests/odata-atom-tests.js
index 7131e1e..6e32495 100644
--- a/datajs/tests/odata-atom-tests.js
+++ b/datajs/tests/odata-atom-tests.js
@@ -58,13 +58,13 @@
     '</edmx:DataServices></edmx:Edmx>';
 
     var foodServiceV4FoodsSampleText = '' +
-    '<feed xml:base="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods">' +
-	'<id>http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Foods</id>' +
+    '<feed xml:base="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods">' +
+	'<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods</id>' +
 	'<title type="text">Foods</title>' +
 	'<updated>2013-12-30T05:45:07Z</updated>' +
 	'<link rel="self" title="Foods" href="Foods" />' +
 	'<entry>' +
-	'	<id>http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)</id>' +
+	'	<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)</id>' +
 	'	<category term="#DataJS.Tests.V4.Food" scheme="http://docs.oasis-open.org/odata/ns/scheme" />' +
 	'	<link rel="edit" title="Food" href="Foods(0)" />' +
 	'	<link rel="http://docs.oasis-open.org/odata/ns/related/Category" type="application/atom+xml;type=entry" title="Category" href="Foods(0)/Category" />' +
@@ -73,7 +73,7 @@
 	'	<author>' +
 	'		<name />' +
 	'	</author>' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
+	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
 	'	<link rel="http://docs.oasis-open.org/odata/ns/edit-media/Picture" type="image/png" title="Picture" href="Foods(0)/Picture" m:etag="W/&quot;123456789&quot;" />' +
 	'	<content type="application/xml">' +
 	'		<m:properties>' +
@@ -145,7 +145,7 @@
 	'	</content>' +
 	'</entry>' +
 	'<entry>' +
-	'	<id>http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(1)</id>' +
+	'	<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(1)</id>' +
 	'	<category term="#DataJS.Tests.V4.Food" scheme="http://docs.oasis-open.org/odata/ns/scheme" />' +
 	'	<link rel="edit" title="Food" href="Foods(1)" />' +
 	'	<link rel="http://docs.oasis-open.org/odata/ns/related/Category" type="application/atom+xml;type=entry" title="Category" href="Foods(1)/Category" />' +
@@ -154,7 +154,7 @@
 	'	<author>' +
 	'		<name />' +
 	'	</author>' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
+	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
 	'	<link rel="http://docs.oasis-open.org/odata/ns/edit-media/Picture" type="image/png" title="Picture" href="Foods(1)/Picture" m:etag="W/&quot;123456789&quot;" />' +
 	'	<content type="application/xml">' +
 	'		<m:properties>' +
@@ -422,8 +422,8 @@
 
     djstest.addFullTest(true, function parseIntoPropertiesTest() {
         var payload = '' +
-    '<entry xml:base="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity">' +
-	'<id>http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)</id>' +
+    '<entry xml:base="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity">' +
+	'<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)</id>' +
 	'<category term="#DataJS.Tests.V4.Food" scheme="http://docs.oasis-open.org/odata/ns/scheme" />' +
 	'<link rel="edit" title="Food" href="Foods(0)" />' +
 	'<link rel="http://docs.oasis-open.org/odata/ns/related/Category" type="application/atom+xml;type=entry" title="Category" href="Foods(0)/Category" />' +
@@ -432,7 +432,7 @@
 	'<author>' +
 	'	<name />' +
 	'</author>' +
-	'<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
+	'<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
 	'<link rel="http://docs.oasis-open.org/odata/ns/edit-media/Picture" type="image/png" title="Picture" href="Foods(0)/Picture" m:etag="W/&quot;123456789&quot;" />' +
 	'<content type="application/xml">' +
 	'	<m:properties>' +
@@ -526,13 +526,13 @@
         // OData.read("/tests/endpoints/FoodStoreDataService.svc/Foods?$expand=Category&$filter=Category eq null", function(data, response) {
 
         var body = '' +
-    '<feed xml:base="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods">' +
-	'<id>http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Foods</id>' +
+    '<feed xml:base="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods">' +
+	'<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods</id>' +
 	'<title type="text">Foods</title>' +
 	'<updated>2013-12-30T06:09:18Z</updated>' +
 	'<link rel="self" title="Foods" href="Foods" />' +
 	'<entry>' +
-	'	<id>http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(2)</id>' +
+	'	<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(2)</id>' +
 	'	<category term="#DataJS.Tests.V4.Food" scheme="http://docs.oasis-open.org/odata/ns/scheme" />' +
 	'	<link rel="edit" title="Food" href="Foods(2)" />' +
 	'	<link rel="http://docs.oasis-open.org/odata/ns/related/Category" type="application/atom+xml;type=entry" title="Category" href="Foods(2)/Category">' +
@@ -543,7 +543,7 @@
 	'	<author>' +
 	'		<name />' +
 	'	</author>' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
+	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
 	'	<link rel="http://docs.oasis-open.org/odata/ns/edit-media/Picture" type="image/png" title="Picture" href="Foods(2)/Picture" m:etag="W/&quot;123456789&quot;" />' +
 	'	<content type="application/xml">' +
 	'		<m:properties>' +

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/0c2def20/datajs/tests/odata-batch-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-batch-tests.js b/datajs/tests/odata-batch-tests.js
index 79be366..64bc3c9 100644
--- a/datajs/tests/odata-batch-tests.js
+++ b/datajs/tests/odata-batch-tests.js
@@ -268,9 +268,9 @@ OData-Version: 4.0;\r\n\
 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8\r\n\
 X-Content-Type-Options: nosniff\r\n\
 Cache-Control: no-cache\r\n\
-Location: http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(42)\r\n\
+Location: http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(42)\r\n\
 \r\n\
-{\"@odata.context\":\"http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":42,\"Name\":\"New Category\"}\r\n\
+{\"@odata.context\":\"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":42,\"Name\":\"New Category\"}\r\n\
 --batchresponse_b61ab173-39c7-45ea-ade4-941efae85ab9\r\n\
 Content-Type: application/http\r\n\
 Content-Transfer-Encoding: binary\r\n\
@@ -280,9 +280,9 @@ OData-Version: 4.0;\r\n\
 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8\r\n\
 X-Content-Type-Options: nosniff\r\n\
 Cache-Control: no-cache\r\n\
-Location: http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(43)\r\n\
+Location: http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(43)\r\n\
 \r\n\
-{\"@odata.context\":\"http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":43,\"Name\":\"New Category\"}\r\n\
+{\"@odata.context\":\"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":43,\"Name\":\"New Category\"}\r\n\
 --batchresponse_b61ab173-39c7-45ea-ade4-941efae85ab9--\r\n\
 "
         };
@@ -290,8 +290,8 @@ Location: http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Cate
         MockHttpClient.clear().addResponse("http://testuri.org", response);
         OData.read("http://testuri.org", function (data, response) {
             djstest.assert(data.__batchResponses, "data.__batchResponses is defined");
-            djstest.assertAreEqual(data.__batchResponses[0].headers["Location"], "http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(42)", "part 1 of the response was read");
-            djstest.assertAreEqual(data.__batchResponses[1].headers["Location"], "http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(43)", "part 2 of the response was read");
+            djstest.assertAreEqual(data.__batchResponses[0].headers["Location"], "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(42)", "part 1 of the response was read");
+            djstest.assertAreEqual(data.__batchResponses[1].headers["Location"], "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(43)", "part 2 of the response was read");
             djstest.assertAreEqual(data.__batchResponses[0].data["CategoryID"], 42, "part 1 data of the response was read");
             djstest.assertAreEqual(data.__batchResponses[1].data["CategoryID"], 43, "part 2 data of the response was read");
             djstest.done();
@@ -317,9 +317,9 @@ OData-Version: 4.0;\r\n\
 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8\r\n\
 X-Content-Type-Options: nosniff\r\n\
 Cache-Control: no-cache\r\n\
-Location: http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(42)\r\n\
+Location: http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(42)\r\n\
 \r\n\
-{\"@odata.context\":\"http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":42,\"Name\":\"New Category\"}\r\n\
+{\"@odata.context\":\"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":42,\"Name\":\"New Category\"}\r\n\
 --changesetresponse_905a1494-fd76-4846-93f9-a3431f0bf5a2\r\n\
 Content-Type: application/http\r\n\
 Content-Transfer-Encoding: binary\r\n\
@@ -340,9 +340,9 @@ OData-Version: 4.0;\r\n\
 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8\r\n\
 X-Content-Type-Options: nosniff\r\n\
 Cache-Control: no-cache\r\n\
-Location: http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(41)\r\n\
+Location: http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(41)\r\n\
 \r\n\
-{\"@odata.context\":\"http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":41,\"Name\":\"New Category\"}\r\n\
+{\"@odata.context\":\"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":41,\"Name\":\"New Category\"}\r\n\
 --batchresponse_fb681875-73dc-4e62-9898-a0af89021341\r\n\
 Content-Type: multipart/mixed; boundary=changesetresponse_92cc2ae8-a5f2-47fc-aaa3-1ff9e7453b07\r\n\
 \r\n\
@@ -355,9 +355,9 @@ OData-Version: 4.0;\r\n\
 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8\r\n\
 X-Content-Type-Options: nosniff\r\n\
 Cache-Control: no-cache\r\n\
-Location: http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(43)\r\n\
+Location: http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(43)\r\n\
 \r\n\
-{\"@odata.context\":\"http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":43,\"Name\":\"New Category\"}\r\n\
+{\"@odata.context\":\"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity\",\"Icon@odata.mediaContentType\":\"image/gif\",\"CategoryID\":43,\"Name\":\"New Category\"}\r\n\
 --changesetresponse_92cc2ae8-a5f2-47fc-aaa3-1ff9e7453b07\r\n\
 Content-Type: application/http\r\n\
 Content-Transfer-Encoding: binary\r\n\
@@ -385,15 +385,15 @@ OData-Version: 4.0;\r\n\
             djstest.assert(changesetResponses3, "batch response 3 contains the change set responses");
             
             djstest.assertAreEqual(batchResponses[0].data, undefined, "No data defined for batch response 1");
-            djstest.assertAreEqual(changesetResponses[0].headers["Location"], "http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(42)", "part 1 of the changeset response of the response 1 was read");
+            djstest.assertAreEqual(changesetResponses[0].headers["Location"], "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(42)", "part 1 of the changeset response of the response 1 was read");
             djstest.assertAreEqual(changesetResponses[0].data["CategoryID"], 42, "part 1 data of the changeset response of the response 1 was read");
             djstest.assertAreEqual(changesetResponses[1].data, undefined, "No data defined for no content only response in part 2 of the changeset response of the response 1");
             
-            djstest.assertAreEqual(batchResponses[1].headers["Location"], "http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(41)", "response 2 was read");
+            djstest.assertAreEqual(batchResponses[1].headers["Location"], "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(41)", "response 2 was read");
             djstest.assertAreEqual(batchResponses[1].data["CategoryID"], 41, "response 2 data was read");
             
             djstest.assertAreEqual(batchResponses[2].data, undefined, "No data defined for");
-            djstest.assertAreEqual(changesetResponses3[0].headers["Location"], "http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(43)", "part 1 of the changeset response of the response 3 was read");
+            djstest.assertAreEqual(changesetResponses3[0].headers["Location"], "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(43)", "part 1 of the changeset response of the response 3 was read");
             djstest.assertAreEqual(changesetResponses3[0].data["CategoryID"], 43, "part 1 data of the changeset response of the response 3 was read");
             djstest.assertAreEqual(changesetResponses3[1].data, undefined, "No data defined for no content only response in part 2 of the changeset response of the response 3");
             djstest.done();
@@ -415,7 +415,7 @@ HTTP/1.1 200 OK\r\n\
 Cache-Control: no-cache\r\n\
 OData-Version: 4.0;\r\n\
 Content-Type: application/json;charset=utf-8\r\n\
-Location: http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(1)\r\n\
+Location: http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(1)\r\n\
 \r\n\
 {\"error\":{\"code\":\"\",\"message\":\"Resource not found for the segment 'Categories(1)'.\"}}\r\n\
 --batchresponse_9402a3ab-260f-4fa4-af01-0b30db397c8d\r\n\
@@ -435,7 +435,7 @@ Content-Type: application/json\r\n\
             var batchResponses = data.__batchResponses;
             djstest.assert(batchResponses, "data.__batchResponses is defined");
             djstest.assertAreEqual(batchResponses.length, 2, "batch contains two responses");
-            djstest.assertAreEqual(batchResponses[0].headers["Location"], "http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(1)", "part 1 of the response was read");
+            djstest.assertAreEqual(batchResponses[0].headers["Location"], "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(1)", "part 1 of the response was read");
             djstest.assert(batchResponses[1].response, "part 2 of the response was read");
             djstest.done();
         }, null, OData.batch.batchHandler, MockHttpClient);
@@ -457,7 +457,7 @@ HTTP/1.1 200 OK\r\n\
 Cache-Control: no-cache\r\n\
 OData-Version: 4.0;\r\n\
 Content-Type: application/json;charset=utf-8\r\n\
-Location: http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(1)\r\n\
+Location: http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(1)\r\n\
 \r\n\
 {\"error\":{\"code\":\"\",\"message\":\"Resource not found for the segment 'Categories(1)'.\"}}\r\n\
 --batchresponse_fb681875-73dc-4e62-9898-a0af89021341\r\n\
@@ -483,7 +483,7 @@ Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE7
             var batchResponses = data.__batchResponses;
             djstest.assert(batchResponses, "data.__batchResponses is defined");
             djstest.assertAreEqual(batchResponses.length, 2, "batch contains two responses");
-            djstest.assertAreEqual(batchResponses[0].headers["Location"], "http://localhost:46541/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(1)", "part 1 of the response was read");
+            djstest.assertAreEqual(batchResponses[0].headers["Location"], "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories(1)", "part 1 of the response was read");
 
             var error = batchResponses[1].__changeResponses[0];
             djstest.assert(error.response.body.indexOf("GET operation cannot be specified in a change set") > -1, "Response contains expected message");

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/0c2def20/datajs/tests/odata-qunit-tests.htm
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-qunit-tests.htm b/datajs/tests/odata-qunit-tests.htm
index fca18dc..ee182ff 100644
--- a/datajs/tests/odata-qunit-tests.htm
+++ b/datajs/tests/odata-qunit-tests.htm
@@ -67,11 +67,11 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL
     <script type="text/javascript" src="../src/cache-source.js"></script>
     <script type="text/javascript" src="../src/cache.js"></script>-->
     
-    <script type="text/javascript" src="common/mockHttpClient.js"></script>
-    <script type="text/javascript" src="common/mockXMLHttpRequest.js"></script>
+    <script type="text/javascript" src="./common/mockHttpClient.js"></script>
+    <script type="text/javascript" src="./common/mockXMLHttpRequest.js"></script>
 
     <script type="text/javascript" src="./common/djstest.js"></script>
-<!--SK TODO enable        <script type="text/javascript" src="common/CacheOracle.js"></script>-->
+    <script type="text/javascript" src="./common/CacheOracle.js"></script>
 
 <!--bingl: disable the failure test case. Will fix them in the next change set-->
 <!--    <script type="text/javascript" src="odata-tests.js"></script>-->