Repository: olingo-odata4-js
Updated Branches:
  refs/heads/master 5cd0e2be7 -> cf444be91


[OLINGO-439] fix for node tests


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

Branch: refs/heads/master
Commit: cf444be914c96272f1610534842eed0e2dad0ef3
Parents: 5cd0e2b
Author: Sven Kobler <[email protected]>
Authored: Mon Dec 15 12:04:06 2014 +0100
Committer: Sven Kobler <[email protected]>
Committed: Mon Dec 15 12:04:39 2014 +0100

----------------------------------------------------------------------
 odatajs/test/test-demo-scenario.js | 108 ++++++++++++++--------------
 odatajs/test/test-odata-json.js    | 120 +++++++++++++++++++-------------
 2 files changed, 124 insertions(+), 104 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/cf444be9/odatajs/test/test-demo-scenario.js
----------------------------------------------------------------------
diff --git a/odatajs/test/test-demo-scenario.js 
b/odatajs/test/test-demo-scenario.js
index ab9cb99..bae2b66 100644
--- a/odatajs/test/test-demo-scenario.js
+++ b/odatajs/test/test-demo-scenario.js
@@ -103,19 +103,19 @@ var testDataJsonParserMetadataMinimalToFull = [{
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods";,
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods","value":[{"FoodID":0,"Name":"flour","UnitPrice":0.19999,"ServingSize":1,"MeasurementUnit":"Cup","ProteinGrams":3,"FatGrams":1,"CarbohydrateGrams":20,"CaloriesPerServing":140,"IsAvailable":true,"ExpirationDate":"2010-12-25T12:00:00Z","ItemGUID":"27272727-2727-2727-2727-272727272727","Weight":10,"AvailableUnits":1,"Packaging":{"Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":79228162514264337593543950335,"Height":32767,"Width":9223372036854775807,"Volume":1.7976931348623157E+308}},"CookedSize":{"Length":2,"Height":1,"Width":3,"Volume":6.0},"AlternativeNames":["ground
 cereal","ground grain"],"Providers":[{"Name":"Flour 
Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001}},{"Name":"Ground
 Grains","Aliases":[],"Details":null}],"
 
SpatialData":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[5.0,5.0]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}}},{"FoodID":1,"Name":"sugar","UnitPrice":0.2,"ServingSize":1,"MeasurementUnit":"tsp","ProteinGrams":0,"FatGrams":0,"CarbohydrateGrams":4,"CaloriesPerServing":16,"IsAvailable":false,"ExpirationDate":"2011-12-28T00:00:00Z","ItemGUID":"ffffffff-ffff-ffff-ffff-ffffffffffff","Weight":0.1,"AvailableUnits":0,"Packaging":{"Type":"
 
","Color":"BLUE","NumberPerPackage":-2147483648,"RequiresRefridgeration":true,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":-79228162514264337593543950335,"Height":-32768,"Width":-9223372036854775808,"Volume":-1.7976931348623157E+308}},"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null},{"FoodID":2,"Name":"1
 Chicken 
Egg","UnitPrice":0.55,"ServingSize":1,"MeasurementUnit":null,"ProteinGrams":6,"FatGrams":1,"CarbohydrateGrams":1,"CaloriesPerServing":70,"IsAvailable":true,"Ex
 
pirationDate":"2000-12-29T00:00:00Z","ItemGUID":"00000000-0000-0000-0000-000000000000","Weight":0,"AvailableUnits":-128,"Packaging":{"Type":"18
     - Carton","Color":" brown 
","NumberPerPackage":0,"RequiresRefridgeration":true,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":null},"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null},{"FoodID":3,"Name":"Brown
 
Sugar","UnitPrice":1.6,"ServingSize":1,"MeasurementUnit":"TSP.","ProteinGrams":0,"FatGrams":0,"CarbohydrateGrams":5,"CaloriesPerServing":16,"IsAvailable":true,"ExpirationDate":"2011-12-28T00:00:00Z","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","Weight":4.5,"AvailableUnits":127,"Packaging":null,"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null},{"@odata.type":"#DataJS.Tests.V4.PreparedFood","FoodID":4,"Name":"Cobb
 
Salad","UnitPrice":1.99,"ServingSize":-1,"MeasurementUnit":"cups","ProteinGrams":6,"FatGrams":1,"CarbohydrateGrams":3,"CaloriesPerServing":5,"IsAvailable":true,"Ex
 
pirationDate":"2000-12-29T00:00:00Z","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","Weight":5.674,"AvailableUnits":127,"Packaging":null,"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"Instructions":"1.)
 Open 2.) 
Eat","NumberOfIngredients":4}],"@odata.nextLink":"Foods?$skiptoken=4"}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods","value":[{"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)","@odata.editLink":"Foods(0)","FoodID":0,"Name":"flour","UnitPrice":0.19999,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":"Cup","[email protected]":"#Byte","ProteinGrams":3,"[email protected]":"#Int16","FatGrams":1,"CarbohydrateGrams":20,"[email protected]":"#Int64","CaloriesPerServing":140,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2010-12-25T12:00:00Z","[email protected]":"#Guid","ItemGUID":"27272727-2727-2727-2727-272727272727","[email protected]":"#Single","Weight":10,"[email protected]":"#SByte","AvailableUnits":1,"Packaging":{"@odata.type":"#DataJS.Tests.V4.Package","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration
 
":false,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","Length":7.922816251426434e+28,"[email protected]":"#Int16","Height":32767,"[email protected]":"#Int64","Width":9223372036854776000,"Volume":1.7976931348623157e+308,"[email protected]":"#Int32"},"[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},"CookedSize":{"@odata.type":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Decimal","Length":2,"[email protected]":"#Int16","Height":1,"[email protected]":"#Int64","Width":3,"Volume":6,"[email protected]":"#Int32"},"[email protected]":"#Collection(String)","AlternativeNames":["ground
 cereal","ground 
grain"],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Flour
 Provider","[email protected]":"#Collection(Str
 ing)","Aliases":["fp1","flour 
provider1"],"Details":{"@odata.type":"#DataJS.Tests.V4.ProviderDetails","Telephone":"555-555-555","PreferredCode":1001,"[email protected]":"#String","[email protected]":"#Int32"},"[email protected]":"#String"},{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Ground
 
Grains","[email protected]":"#Collection(String)","Aliases":[],"Details":null,"[email protected]":"#String"}],"[email protected]":"#GeometryCollection","SpatialData":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[5,5],"[email protected]":"#String"}],"crs":{"type":"name","properties":{"name":"EPSG:4326","[email protected]":"#String"},"[email protected]":"#String"},"[email protected]":"#String"},"[email protected]":"Foods(0)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},{"@odata.typ
 
e":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(1)","@odata.editLink":"Foods(1)","FoodID":1,"Name":"sugar","UnitPrice":0.2,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":"tsp","[email protected]":"#Byte","ProteinGrams":0,"[email protected]":"#Int16","FatGrams":0,"CarbohydrateGrams":4,"[email protected]":"#Int64","CaloriesPerServing":16,"IsAvailable":false,"[email protected]":"#DateTimeOffset","ExpirationDate":"2011-12-28T00:00:00Z","[email protected]":"#Guid","ItemGUID":"ffffffff-ffff-ffff-ffff-ffffffffffff","[email protected]":"#Single","Weight":0.1,"[email protected]":"#SByte","AvailableUnits":0,"Packaging":{"@odata.type":"#DataJS.Tests.V4.Package","Type":"
 
","Color":"BLUE","NumberPerPackage":-2147483648,"RequiresRefridgeration":true,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"@odata.type":"#DataJS.Tests.V4.
 
Dimensions","[email protected]":"#Decimal","Length":-7.922816251426434e+28,"[email protected]":"#Int16","Height":-32768,"[email protected]":"#Int64","Width":-9223372036854776000,"Volume":-1.7976931348623157e+308,"[email protected]":"#Int32"},"[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},"CookedSize":null,"[email protected]":"#Collection(String)","AlternativeNames":[],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[],"SpatialData":null,"[email protected]":"Foods(1)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},{"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(2)","@odata.editLink":"Foods(2)","FoodID"
 :2,"Name":"1 Chicken 
Egg","UnitPrice":0.55,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":null,"[email protected]":"#Byte","ProteinGrams":6,"[email protected]":"#Int16","FatGrams":1,"CarbohydrateGrams":1,"[email protected]":"#Int64","CaloriesPerServing":70,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2000-12-29T00:00:00Z","[email protected]":"#Guid","ItemGUID":"00000000-0000-0000-0000-000000000000","[email protected]":"#Single","Weight":0,"[email protected]":"#SByte","AvailableUnits":-128,"Packaging":{"@odata.type":"#DataJS.Tests.V4.Package","Type":"18
     - Carton","Color":" brown 
","NumberPerPackage":0,"RequiresRefridgeration":true,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":null,"[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},"CookedSize":null,"Al
 
[email protected]":"#Collection(String)","AlternativeNames":[],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[],"SpatialData":null,"[email protected]":"Foods(2)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#Int32","[email protected]":"#Boolean"},{"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(3)","@odata.editLink":"Foods(3)","FoodID":3,"Name":"Brown
 
Sugar","UnitPrice":1.6,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":"TSP.","[email protected]":"#Byte","ProteinGrams":0,"[email protected]":"#Int16","FatGrams":0,"CarbohydrateGrams":5,"[email protected]":"#Int64","CaloriesPerServing":16,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2011-12-28T00:00:00Z","[email protected]":"#Guid","ItemGUID":
 
"01234567-89ab-cdef-0123-456789abcdef","[email protected]":"#Single","Weight":4.5,"[email protected]":"#SByte","AvailableUnits":127,"Packaging":null,"CookedSize":null,"[email protected]":"#Collection(String)","AlternativeNames":[],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[],"SpatialData":null,"[email protected]":"Foods(3)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},{"@odata.type":"#DataJS.Tests.V4.PreparedFood","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(4)","@odata.editLink":"Foods(4)/DataJS.Tests.V4.PreparedFood","FoodID":4,"Name":"Cobb
 
Salad","UnitPrice":1.99,"[email protected]":"#Decimal","ServingSize":-1,"MeasurementUnit":"cups","[email protected]":"#Byte","ProteinGrams":6,"[email protected]":
 
"#Int16","FatGrams":1,"CarbohydrateGrams":3,"[email protected]":"#Int64","CaloriesPerServing":5,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2000-12-29T00:00:00Z","[email protected]":"#Guid","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","[email protected]":"#Single","Weight":5.674,"[email protected]":"#SByte","AvailableUnits":127,"Packaging":null,"CookedSize":null,"[email protected]":"#Collection(String)","AlternativeNames":[],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[],"SpatialData":null,"Instructions":"1.)
 Open 2.) 
Eat","[email protected]":"#Single","NumberOfIngredients":4,"[email protected]":"Foods(4)/DataJS.Tests.V4.PreparedFood/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean","Instru
 [email protected]":"#String"}],"@odata.nextLink":"Foods?$skiptoken=4"}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods","value":[{"FoodID":0,"Name":"flour","UnitPrice":0.19999,"ServingSize":1,"MeasurementUnit":"Cup","ProteinGrams":3,"FatGrams":1,"CarbohydrateGrams":20,"CaloriesPerServing":140,"IsAvailable":true,"ExpirationDate":"2010-12-25T12:00:00Z","ItemGUID":"27272727-2727-2727-2727-272727272727","Weight":10,"AvailableUnits":1,"Packaging":{"Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":7.922816251426434e+28,"Height":32767,"Width":9223372036854776000,"Volume":1.7976931348623157e+308,"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","RequiresRe
 
[email protected]":"#Boolean","[email protected]":"#DateTimeOffset"},"CookedSize":{"Length":2,"Height":1,"Width":3,"Volume":6,"@odata.type":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"AlternativeNames":["ground
 cereal","ground grain"],"Providers":[{"Name":"Flour 
Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001,"@odata.type":"#DataJS.Tests.V4.ProviderDetails","[email protected]":"#String","[email protected]":"#Int32"},"@odata.type":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#String","[email protected]":"#Collection(String)"},{"Name":"Ground
 
Grains","Aliases":[],"Details":null,"@odata.type":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#String","[email protected]":"#Collection(String)","[email protected]":"#DataJS.Tests.V4.ProviderDetails"}],"SpatialData":{"type":"Geometr
 
yCollection","geometries":[{"type":"Point","coordinates":[5,5]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"@odata.type":"#Edm.GeometryCollection"},"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)","@odata.editLink":"Foods(0)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)"},{"FoodID":1,"Name":"sugar","UnitPrice":0.2,"ServingSize":1,"MeasurementUni
 
t":"tsp","ProteinGrams":0,"FatGrams":0,"CarbohydrateGrams":4,"CaloriesPerServing":16,"IsAvailable":false,"ExpirationDate":"2011-12-28T00:00:00Z","ItemGUID":"ffffffff-ffff-ffff-ffff-ffffffffffff","Weight":0.1,"AvailableUnits":0,"Packaging":{"Type":"
 
","Color":"BLUE","NumberPerPackage":-2147483648,"RequiresRefridgeration":true,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":-7.922816251426434e+28,"Height":-32768,"Width":-9223372036854776000,"Volume":-1.7976931348623157e+308,"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset"},"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"@odata.type":"#DataJS.Tests.V4.Food","@od
 
ata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(1)","@odata.editLink":"Foods(1)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#GeometryCollection"},{"FoodID":2,"Name":"1
 Chicken 
Egg","UnitPrice":0.55,"ServingSize":1,"MeasurementUnit":null,"ProteinGrams":6,"FatGrams":1,"CarbohydrateGrams":1,"CaloriesPerServing":70,"IsA
 
vailable":true,"ExpirationDate":"2000-12-29T00:00:00Z","ItemGUID":"00000000-0000-0000-0000-000000000000","Weight":0,"AvailableUnits":-128,"Packaging":{"Type":"18
     - Carton","Color":" brown 
","NumberPerPackage":0,"RequiresRefridgeration":true,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":null,"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#DataJS.Tests.V4.Dimensions"},"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(2)","@odata.editLink":"Foods(2)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","ProteinGrams
 
@odata.type":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#GeometryCollection"},{"FoodID":3,"Name":"Brown
 
Sugar","UnitPrice":1.6,"ServingSize":1,"MeasurementUnit":"TSP.","ProteinGrams":0,"FatGrams":0,"CarbohydrateGrams":5,"CaloriesPerServing":16,"IsAvailable":true,"ExpirationDate":"2011-12-28T00:00:00Z","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","Weight":4.5,"AvailableUnits":127,"Packaging":null,"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://loca
 
lhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(3)","@odata.editLink":"Foods(3)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#DataJS.Tests.V4.Package","[email protected]":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#GeometryCollection"},{"@odata.type":"#DataJS.Tests.V4.PreparedFood","FoodID":4,"Name":"Cobb
 Salad","UnitPrice":1.99,"ServingSize":-1,"MeasurementUnit":"cups","Pro
 
teinGrams":6,"FatGrams":1,"CarbohydrateGrams":3,"CaloriesPerServing":5,"IsAvailable":true,"ExpirationDate":"2000-12-29T00:00:00Z","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","Weight":5.674,"AvailableUnits":127,"Packaging":null,"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"Instructions":"1.)
 Open 2.) 
Eat","NumberOfIngredients":4,"@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(4)","@odata.editLink":"Foods(4)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#
 
DataJS.Tests.V4.Package","[email protected]":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#GeometryCollection","[email protected]":"#String","[email protected]":"#Single"}],"@odata.nextLink":"Foods?$skiptoken=4"}
 },{
   description: "Entry with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)",
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity","FoodID":0,"Name":"flour","UnitPrice":0.19999,"ServingSize":1,"MeasurementUnit":"Cup","ProteinGrams":3,"FatGrams":1,"CarbohydrateGrams":20,"CaloriesPerServing":140,"IsAvailable":true,"ExpirationDate":"2010-12-25T12:00:00Z","ItemGUID":"27272727-2727-2727-2727-272727272727","Weight":10,"AvailableUnits":1,"Packaging":{"Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":79228162514264337593543950335,"Height":32767,"Width":9223372036854775807,"Volume":1.7976931348623157E+308}},"CookedSize":{"Length":2,"Height":1,"Width":3,"Volume":6.0},"AlternativeNames":["ground
 cereal","ground grain"],"Providers":[{"Name":"Flour 
Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001}},{"Name":"Ground
 Grains","Aliases":[],"Details":null}],"Sp
 
atialData":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[5.0,5.0]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}}}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity","@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)","@odata.editLink":"Foods(0)","FoodID":0,"Name":"flour","UnitPrice":0.19999,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":"Cup","[email protected]":"#Byte","ProteinGrams":3,"[email protected]":"#Int16","FatGrams":1,"CarbohydrateGrams":20,"[email protected]":"#Int64","CaloriesPerServing":140,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2010-12-25T12:00:00Z","[email protected]":"#Guid","ItemGUID":"27272727-2727-2727-2727-272727272727","[email protected]":"#Single","Weight":10,"[email protected]":"#SByte","AvailableUnits":1,"Packaging":{"@odata.type":"#DataJS.Tests.V4.Package","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":
 
false,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","Length":7.922816251426434e+28,"[email protected]":"#Int16","Height":32767,"[email protected]":"#Int64","Width":9223372036854776000,"Volume":1.7976931348623157e+308,"[email protected]":"#Int32"},"[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},"CookedSize":{"@odata.type":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Decimal","Length":2,"[email protected]":"#Int16","Height":1,"[email protected]":"#Int64","Width":3,"Volume":6,"[email protected]":"#Int32"},"[email protected]":"#Collection(String)","AlternativeNames":["ground
 cereal","ground 
grain"],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Flour
 Provider","[email protected]":"#Collection(Strin
 g)","Aliases":["fp1","flour 
provider1"],"Details":{"@odata.type":"#DataJS.Tests.V4.ProviderDetails","Telephone":"555-555-555","PreferredCode":1001,"[email protected]":"#String","[email protected]":"#Int32"},"[email protected]":"#String"},{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Ground
 
Grains","[email protected]":"#Collection(String)","Aliases":[],"Details":null,"[email protected]":"#String"}],"[email protected]":"#GeometryCollection","SpatialData":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[5,5],"[email protected]":"#String"}],"crs":{"type":"name","properties":{"name":"EPSG:4326","[email protected]":"#String"},"[email protected]":"#String"},"[email protected]":"#String"},"[email protected]":"Foods(0)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity","FoodID":0,"Name":"flour","UnitPrice":0.19999,"ServingSize":1,"MeasurementUnit":"Cup","ProteinGrams":3,"FatGrams":1,"CarbohydrateGrams":20,"CaloriesPerServing":140,"IsAvailable":true,"ExpirationDate":"2010-12-25T12:00:00Z","ItemGUID":"27272727-2727-2727-2727-272727272727","Weight":10,"AvailableUnits":1,"Packaging":{"Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":7.922816251426434e+28,"Height":32767,"Width":9223372036854776000,"Volume":1.7976931348623157e+308,"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","RequiresRefr
 
[email protected]":"#Boolean","[email protected]":"#DateTimeOffset"},"CookedSize":{"Length":2,"Height":1,"Width":3,"Volume":6,"@odata.type":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"AlternativeNames":["ground
 cereal","ground grain"],"Providers":[{"Name":"Flour 
Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001,"@odata.type":"#DataJS.Tests.V4.ProviderDetails","[email protected]":"#String","[email protected]":"#Int32"},"@odata.type":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#String","[email protected]":"#Collection(String)"},{"Name":"Ground
 
Grains","Aliases":[],"Details":null,"@odata.type":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#String","[email protected]":"#Collection(String)","[email protected]":"#DataJS.Tests.V4.ProviderDetails"}],"SpatialData":{"type":"GeometryC
 
ollection","geometries":[{"type":"Point","coordinates":[5,5]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"@odata.type":"#Edm.GeometryCollection"},"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)","@odata.editLink":"Foods(0)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)"}
 },{
   description: "Collection of Complex with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/Providers",
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Providers","value":[{"Name":"Flour
 Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001}},{"Name":"Ground
 Grains","Aliases":[],"Details":null}]}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Providers","@odata.type":"#Collection(DataJS.Tests.V4.Provider)","value":[{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Flour
 Provider","[email protected]":"#Collection(String)","Aliases":["fp1","flour 
provider1"],"Details":{"@odata.type":"#DataJS.Tests.V4.ProviderDetails","Telephone":"555-555-555","PreferredCode":1001,"[email protected]":"#String","[email protected]":"#Int32"},"[email protected]":"#String"},{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Ground
 
Grains","[email protected]":"#Collection(String)","Aliases":[],"Details":null,"[email protected]":"#String"}]}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Providers","value":[{"Name":"Flour
 Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001,"@odata.type":"#DataJS.Tests.V4.ProviderDetails","[email protected]":"#String","[email protected]":"#Int32"},"@odata.type":"#DataJS.Tests.V4.Provider","[email protected]":"#String","[email protected]":"#Collection(String)"},{"Name":"Ground
 
Grains","Aliases":[],"Details":null,"@odata.type":"#DataJS.Tests.V4.Provider","[email protected]":"#String","[email protected]":"#Collection(String)","[email protected]":"#DataJS.Tests.V4.ProviderDetails"}],"@odata.type":"#Collection(DataJS.Tests.V4.Provider)"}
 },{
   description: "Collection of Simple with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
@@ -127,7 +127,7 @@ var testDataJsonParserMetadataMinimalToFull = [{
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/Packaging",
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Packaging","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":79228162514264337593543950335,"Height":32767,"Width":9223372036854775807,"Volume":1.7976931348623157E+308}}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Packaging","@odata.type":"#DataJS.Tests.V4.Package","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","Length":7.922816251426434e+28,"[email protected]":"#Int16","Height":32767,"[email protected]":"#Int64","Width":9223372036854776000,"Volume":1.7976931348623157e+308,"[email protected]":"#Int32"},"[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Packaging","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":7.922816251426434e+28,"Height":32767,"Width":9223372036854776000,"Volume":1.7976931348623157e+308,"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset"}
 },{
   description: "Simple Property with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
@@ -176,65 +176,68 @@ var testDataJsonParserMetadataFull = [{
 }];
 
 
-var callTestNoMetadata = function(testData,done) {
-
-  var request = {
-      requestUri : testData.usedUrl,
-      headers :  {
-        Accept : testData.header
-      }
-  };
+var callTestNoMetadata = function(testData) {
+  var testData = testData;
+  it(testData.description, function (done) {
+    var request = {
+        requestUri : testData.usedUrl,
+        headers :  {
+          Accept : testData.header
+        }
+    };
 
-  var success = function success(data) {
-    assert.deepEqual(data, testData.expected, "test '" + testData.description 
+ "' didn't return the expected data");
-    done();
-  };
+    var success = function success(data) {
+      assert.deepEqual(data, testData.expected, "test '" + 
testData.description + "' didn't return the expected data");
+      done();
+    };
 
-  var errorFunc = function errorFunc(err) {
-    assert.fail('errorFunc','success', 'success should called');
-    done(err);
-  };
- 
-   odatajs.oData.read(request, success, errorFunc);
+    var errorFunc = function errorFunc(err) {
+      assert.fail('errorFunc','success', 'success should called');
+      done(err);
+    };
+   
+     odatajs.oData.read(request, success, errorFunc);
+  });
 };
 
-var callTestMetadata = function(testData,metadata,done) {
-  var request = {
-      requestUri : testData.usedUrl,
-      headers :  {
-        Accept : testData.header
-      }
-  };
+var callTestMetadata = function(testData,metadataContainer) {
+  
+  var testData = testData;
+  it(testData.description, function (done) {
+    
+    var request = {
+        requestUri : testData.usedUrl,
+        headers :  {
+          Accept : testData.header
+        }
+    };
 
-  var success = function success(data) {
-    assert.deepEqual(data, testData.expected, "test '" + testData.description 
+ "' didn't return the expected data");
-    done();
-  };
+    var success = function success(data) {
+      assert.deepEqual(data, testData.expected, "test '" + 
testData.description + "' didn't return the expected data");
+      done();
+    };
 
-  var errorFunc = function errorFunc(err) {
-    done(err);
-  };
+    var errorFunc = function errorFunc(err) {
+      done(err);
+    };
  
-  odatajs.oData.read(request, success, errorFunc, null, null, metadata);
+  odatajs.oData.read(request, success, errorFunc, null, null, 
metadataContainer.metadata);
+  });
 };
 
 describe('TEST Scenario (needs c# test server on localhost:4002)', function() {
 
     describe('with odata.metadata=none', function() {
         for( var i = 0; i < testDataJsonParserMetadataNone.length;i++) {
-          var testData = testDataJsonParserMetadataNone[i];
-          it(testData.description, function (done) {
-            callTestNoMetadata(testData,done);
-          });
+          
+            callTestNoMetadata(testDataJsonParserMetadataNone[i]);
+
         }
     });
 
     describe('with odata.metadata=minimal', function() {
         for( var i = 0; i < testDataJsonParserMetadataMinimal.length;i++) {
-          var testData = testDataJsonParserMetadataMinimal[i];
-          it(testData.description, function (done) {
-            callTestNoMetadata(testData,done);
-          });
+            callTestNoMetadata(testDataJsonParserMetadataMinimal[i]);
         }
     });
 
@@ -242,7 +245,7 @@ describe('TEST Scenario (needs c# test server on 
localhost:4002)', function() {
 
 
     describe('with odata.metadata=minimal to full', function() {
-      var metadata;
+      var metadataContainer = {};
 
       function errorFunc(err) {
             assert.fail('errorFunc','success', 'success should called');
@@ -251,7 +254,8 @@ describe('TEST Scenario (needs c# test server on 
localhost:4002)', function() {
 
       before('load Metadata',function(done) {
         var metaDatasuccess = function(lmetadata){
-            metadata = lmetadata;
+            
+            metadataContainer.metadata = lmetadata;
             done();
         };
         var oHeaders = {
@@ -271,19 +275,13 @@ describe('TEST Scenario (needs c# test server on 
localhost:4002)', function() {
       });
 
       for( var i = 0; i < testDataJsonParserMetadataMinimalToFull.length;i++) {
-        var testData = testDataJsonParserMetadataMinimalToFull[i];
-        it(testData.description, function (done) {
-          callTestMetadata(testData,metadata, done);
-        });
+            
callTestMetadata(testDataJsonParserMetadataMinimalToFull[i],metadataContainer);
       }
     });
 
     describe('with odata.metadata=full', function() {
         for( var i = 0; i < testDataJsonParserMetadataFull.length;i++) {
-          var testData = testDataJsonParserMetadataFull[i];
-          it(testData.description, function (done) {
-            callTestNoMetadata(testData,done);
-          });
+            callTestNoMetadata(testDataJsonParserMetadataFull[i]);
         }
     });
 });

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/cf444be9/odatajs/test/test-odata-json.js
----------------------------------------------------------------------
diff --git a/odatajs/test/test-odata-json.js b/odatajs/test/test-odata-json.js
index f0530f7..bfbb99f 100644
--- a/odatajs/test/test-odata-json.js
+++ b/odatajs/test/test-odata-json.js
@@ -21,12 +21,68 @@ var odatajs = require('./../src/index-node.js');
 var chai = require('chai');
 var assert = chai.assert;
 
-var callTest = function(testData,context) {
-  var actual = odatajs.oData.json.jsonParser(
-        odatajs.oData.json.jsonHandler, 
-        testData.input, 
-        context);
-  assert.deepEqual(actual, testData.expected, "test '" + testData.description 
+ "' didn't return the expected data");
+var callTest_None = function(testData,context) {
+  var testData = testData;
+  var context =  { 
+    response: { requestUri: testData.usedUrl }, 
+    contentType : { properties : { "odata.metadata" : 'none'}},
+    dataServiceVersion: "4.0" 
+  };
+  it(testData.description, function () {
+    var actual = odatajs.oData.json.jsonParser(
+          odatajs.oData.json.jsonHandler, 
+          testData.input, 
+          context);
+        assert.deepEqual(actual, testData.expected, "test '" + 
testData.description + "' didn't return the expected data");
+    });
+};
+
+var callTest_Minimal = function(testData,context) {
+  var testData = testData;
+  var context =  { 
+            response: { requestUri: testData.usedUrl }, 
+            contentType : { properties : { "odata.metadata" : 'minimal'}},
+            dataServiceVersion: "4.0" 
+          };
+  it(testData.description, function () {
+    var actual = odatajs.oData.json.jsonParser(
+          odatajs.oData.json.jsonHandler, 
+          testData.input, 
+          context);
+        assert.deepEqual(actual, testData.expected, "test '" + 
testData.description + "' didn't return the expected data");
+    });
+};
+var callTest_MinimalToFull = function(testData,context) {
+  var testData = testData;
+  var context =  { 
+            response: { requestUri: testData.usedUrl }, 
+            contentType : { properties : { "odata.metadata" : 'minimal'}},
+            dataServiceVersion: "4.0",
+            metadata : testDataJsonParserMetadataMinimalToFullMetaData
+          };
+  it(testData.description, function () {
+    var actual = odatajs.oData.json.jsonParser(
+          odatajs.oData.json.jsonHandler, 
+          testData.input, 
+          context);
+        assert.deepEqual(actual, testData.expected, "test '" + 
testData.description + "' didn't return the expected data");
+    });
+};
+
+var callTest_Full = function(testData,context) {
+  var testData = testData;
+  var context =  { 
+            response: { requestUri: testData.usedUrl }, 
+            contentType : { properties : { "odata.metadata" : 'full'}},
+            dataServiceVersion: "4.0" 
+          };
+  it(testData.description, function () {
+    var actual = odatajs.oData.json.jsonParser(
+          odatajs.oData.json.jsonHandler, 
+          testData.input, 
+          context);
+        assert.deepEqual(actual, testData.expected, "test '" + 
testData.description + "' didn't return the expected data");
+    });
 };
 
 var testDataJsonParserMetadataNone = [{
@@ -112,31 +168,31 @@ var testDataJsonParserMetadataMinimalToFull = [{
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods";,
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods","value":[{"FoodID":0,"Name":"flour","UnitPrice":0.19999,"ServingSize":1,"MeasurementUnit":"Cup","ProteinGrams":3,"FatGrams":1,"CarbohydrateGrams":20,"CaloriesPerServing":140,"IsAvailable":true,"ExpirationDate":"2010-12-25T12:00:00Z","ItemGUID":"27272727-2727-2727-2727-272727272727","Weight":10,"AvailableUnits":1,"Packaging":{"Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":79228162514264337593543950335,"Height":32767,"Width":9223372036854775807,"Volume":1.7976931348623157E+308}},"CookedSize":{"Length":2,"Height":1,"Width":3,"Volume":6.0},"AlternativeNames":["ground
 cereal","ground grain"],"Providers":[{"Name":"Flour 
Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001}},{"Name":"Ground
 Grains","Aliases":[],"Details":null}],"
 
SpatialData":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[5.0,5.0]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}}},{"FoodID":1,"Name":"sugar","UnitPrice":0.2,"ServingSize":1,"MeasurementUnit":"tsp","ProteinGrams":0,"FatGrams":0,"CarbohydrateGrams":4,"CaloriesPerServing":16,"IsAvailable":false,"ExpirationDate":"2011-12-28T00:00:00Z","ItemGUID":"ffffffff-ffff-ffff-ffff-ffffffffffff","Weight":0.1,"AvailableUnits":0,"Packaging":{"Type":"
 
","Color":"BLUE","NumberPerPackage":-2147483648,"RequiresRefridgeration":true,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":-79228162514264337593543950335,"Height":-32768,"Width":-9223372036854775808,"Volume":-1.7976931348623157E+308}},"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null},{"FoodID":2,"Name":"1
 Chicken 
Egg","UnitPrice":0.55,"ServingSize":1,"MeasurementUnit":null,"ProteinGrams":6,"FatGrams":1,"CarbohydrateGrams":1,"CaloriesPerServing":70,"IsAvailable":true,"Ex
 
pirationDate":"2000-12-29T00:00:00Z","ItemGUID":"00000000-0000-0000-0000-000000000000","Weight":0,"AvailableUnits":-128,"Packaging":{"Type":"18
     - Carton","Color":" brown 
","NumberPerPackage":0,"RequiresRefridgeration":true,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":null},"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null},{"FoodID":3,"Name":"Brown
 
Sugar","UnitPrice":1.6,"ServingSize":1,"MeasurementUnit":"TSP.","ProteinGrams":0,"FatGrams":0,"CarbohydrateGrams":5,"CaloriesPerServing":16,"IsAvailable":true,"ExpirationDate":"2011-12-28T00:00:00Z","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","Weight":4.5,"AvailableUnits":127,"Packaging":null,"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null},{"@odata.type":"#DataJS.Tests.V4.PreparedFood","FoodID":4,"Name":"Cobb
 
Salad","UnitPrice":1.99,"ServingSize":-1,"MeasurementUnit":"cups","ProteinGrams":6,"FatGrams":1,"CarbohydrateGrams":3,"CaloriesPerServing":5,"IsAvailable":true,"Ex
 
pirationDate":"2000-12-29T00:00:00Z","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","Weight":5.674,"AvailableUnits":127,"Packaging":null,"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"Instructions":"1.)
 Open 2.) 
Eat","NumberOfIngredients":4}],"@odata.nextLink":"Foods?$skiptoken=4"}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods","value":[{"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)","@odata.editLink":"Foods(0)","FoodID":0,"Name":"flour","UnitPrice":0.19999,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":"Cup","[email protected]":"#Byte","ProteinGrams":3,"[email protected]":"#Int16","FatGrams":1,"CarbohydrateGrams":20,"[email protected]":"#Int64","CaloriesPerServing":140,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2010-12-25T12:00:00Z","[email protected]":"#Guid","ItemGUID":"27272727-2727-2727-2727-272727272727","[email protected]":"#Single","Weight":10,"[email protected]":"#SByte","AvailableUnits":1,"Packaging":{"@odata.type":"#DataJS.Tests.V4.Package","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration
 
":false,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","Length":7.922816251426434e+28,"[email protected]":"#Int16","Height":32767,"[email protected]":"#Int64","Width":9223372036854776000,"Volume":1.7976931348623157e+308,"[email protected]":"#Int32"},"[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},"CookedSize":{"@odata.type":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Decimal","Length":2,"[email protected]":"#Int16","Height":1,"[email protected]":"#Int64","Width":3,"Volume":6,"[email protected]":"#Int32"},"[email protected]":"#Collection(String)","AlternativeNames":["ground
 cereal","ground 
grain"],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Flour
 Provider","[email protected]":"#Collection(Str
 ing)","Aliases":["fp1","flour 
provider1"],"Details":{"@odata.type":"#DataJS.Tests.V4.ProviderDetails","Telephone":"555-555-555","PreferredCode":1001,"[email protected]":"#String","[email protected]":"#Int32"},"[email protected]":"#String"},{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Ground
 
Grains","[email protected]":"#Collection(String)","Aliases":[],"Details":null,"[email protected]":"#String"}],"[email protected]":"#GeometryCollection","SpatialData":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[5,5],"[email protected]":"#String"}],"crs":{"type":"name","properties":{"name":"EPSG:4326","[email protected]":"#String"},"[email protected]":"#String"},"[email protected]":"#String"},"[email protected]":"Foods(0)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},{"@odata.typ
 
e":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(1)","@odata.editLink":"Foods(1)","FoodID":1,"Name":"sugar","UnitPrice":0.2,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":"tsp","[email protected]":"#Byte","ProteinGrams":0,"[email protected]":"#Int16","FatGrams":0,"CarbohydrateGrams":4,"[email protected]":"#Int64","CaloriesPerServing":16,"IsAvailable":false,"[email protected]":"#DateTimeOffset","ExpirationDate":"2011-12-28T00:00:00Z","[email protected]":"#Guid","ItemGUID":"ffffffff-ffff-ffff-ffff-ffffffffffff","[email protected]":"#Single","Weight":0.1,"[email protected]":"#SByte","AvailableUnits":0,"Packaging":{"@odata.type":"#DataJS.Tests.V4.Package","Type":"
 
","Color":"BLUE","NumberPerPackage":-2147483648,"RequiresRefridgeration":true,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"@odata.type":"#DataJS.Tests.V4.
 
Dimensions","[email protected]":"#Decimal","Length":-7.922816251426434e+28,"[email protected]":"#Int16","Height":-32768,"[email protected]":"#Int64","Width":-9223372036854776000,"Volume":-1.7976931348623157e+308,"[email protected]":"#Int32"},"[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},"CookedSize":null,"[email protected]":"#Collection(String)","AlternativeNames":[],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[],"SpatialData":null,"[email protected]":"Foods(1)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},{"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(2)","@odata.editLink":"Foods(2)","FoodID"
 :2,"Name":"1 Chicken 
Egg","UnitPrice":0.55,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":null,"[email protected]":"#Byte","ProteinGrams":6,"[email protected]":"#Int16","FatGrams":1,"CarbohydrateGrams":1,"[email protected]":"#Int64","CaloriesPerServing":70,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2000-12-29T00:00:00Z","[email protected]":"#Guid","ItemGUID":"00000000-0000-0000-0000-000000000000","[email protected]":"#Single","Weight":0,"[email protected]":"#SByte","AvailableUnits":-128,"Packaging":{"@odata.type":"#DataJS.Tests.V4.Package","Type":"18
     - Carton","Color":" brown 
","NumberPerPackage":0,"RequiresRefridgeration":true,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":null,"[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},"CookedSize":null,"Al
 
[email protected]":"#Collection(String)","AlternativeNames":[],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[],"SpatialData":null,"[email protected]":"Foods(2)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#Int32","[email protected]":"#Boolean"},{"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(3)","@odata.editLink":"Foods(3)","FoodID":3,"Name":"Brown
 
Sugar","UnitPrice":1.6,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":"TSP.","[email protected]":"#Byte","ProteinGrams":0,"[email protected]":"#Int16","FatGrams":0,"CarbohydrateGrams":5,"[email protected]":"#Int64","CaloriesPerServing":16,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2011-12-28T00:00:00Z","[email protected]":"#Guid","ItemGUID":
 
"01234567-89ab-cdef-0123-456789abcdef","[email protected]":"#Single","Weight":4.5,"[email protected]":"#SByte","AvailableUnits":127,"Packaging":null,"CookedSize":null,"[email protected]":"#Collection(String)","AlternativeNames":[],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[],"SpatialData":null,"[email protected]":"Foods(3)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},{"@odata.type":"#DataJS.Tests.V4.PreparedFood","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(4)","@odata.editLink":"Foods(4)/DataJS.Tests.V4.PreparedFood","FoodID":4,"Name":"Cobb
 
Salad","UnitPrice":1.99,"[email protected]":"#Decimal","ServingSize":-1,"MeasurementUnit":"cups","[email protected]":"#Byte","ProteinGrams":6,"[email protected]":
 
"#Int16","FatGrams":1,"CarbohydrateGrams":3,"[email protected]":"#Int64","CaloriesPerServing":5,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2000-12-29T00:00:00Z","[email protected]":"#Guid","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","[email protected]":"#Single","Weight":5.674,"[email protected]":"#SByte","AvailableUnits":127,"Packaging":null,"CookedSize":null,"[email protected]":"#Collection(String)","AlternativeNames":[],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[],"SpatialData":null,"Instructions":"1.)
 Open 2.) 
Eat","[email protected]":"#Single","NumberOfIngredients":4,"[email protected]":"Foods(4)/DataJS.Tests.V4.PreparedFood/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean","Instru
 [email protected]":"#String"}],"@odata.nextLink":"Foods?$skiptoken=4"}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods","value":[{"FoodID":0,"Name":"flour","UnitPrice":0.19999,"ServingSize":1,"MeasurementUnit":"Cup","ProteinGrams":3,"FatGrams":1,"CarbohydrateGrams":20,"CaloriesPerServing":140,"IsAvailable":true,"ExpirationDate":"2010-12-25T12:00:00Z","ItemGUID":"27272727-2727-2727-2727-272727272727","Weight":10,"AvailableUnits":1,"Packaging":{"Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":7.922816251426434e+28,"Height":32767,"Width":9223372036854776000,"Volume":1.7976931348623157e+308,"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","RequiresRe
 
[email protected]":"#Boolean","[email protected]":"#DateTimeOffset"},"CookedSize":{"Length":2,"Height":1,"Width":3,"Volume":6,"@odata.type":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"AlternativeNames":["ground
 cereal","ground grain"],"Providers":[{"Name":"Flour 
Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001,"@odata.type":"#DataJS.Tests.V4.ProviderDetails","[email protected]":"#String","[email protected]":"#Int32"},"@odata.type":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#String","[email protected]":"#Collection(String)"},{"Name":"Ground
 
Grains","Aliases":[],"Details":null,"@odata.type":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#String","[email protected]":"#Collection(String)","[email protected]":"#DataJS.Tests.V4.ProviderDetails"}],"SpatialData":{"type":"Geometr
 
yCollection","geometries":[{"type":"Point","coordinates":[5,5]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"@odata.type":"#Edm.GeometryCollection"},"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)","@odata.editLink":"Foods(0)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)"},{"FoodID":1,"Name":"sugar","UnitPrice":0.2,"ServingSize":1,"MeasurementUni
 
t":"tsp","ProteinGrams":0,"FatGrams":0,"CarbohydrateGrams":4,"CaloriesPerServing":16,"IsAvailable":false,"ExpirationDate":"2011-12-28T00:00:00Z","ItemGUID":"ffffffff-ffff-ffff-ffff-ffffffffffff","Weight":0.1,"AvailableUnits":0,"Packaging":{"Type":"
 
","Color":"BLUE","NumberPerPackage":-2147483648,"RequiresRefridgeration":true,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":-7.922816251426434e+28,"Height":-32768,"Width":-9223372036854776000,"Volume":-1.7976931348623157e+308,"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset"},"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"@odata.type":"#DataJS.Tests.V4.Food","@od
 
ata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(1)","@odata.editLink":"Foods(1)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#GeometryCollection"},{"FoodID":2,"Name":"1
 Chicken 
Egg","UnitPrice":0.55,"ServingSize":1,"MeasurementUnit":null,"ProteinGrams":6,"FatGrams":1,"CarbohydrateGrams":1,"CaloriesPerServing":70,"IsA
 
vailable":true,"ExpirationDate":"2000-12-29T00:00:00Z","ItemGUID":"00000000-0000-0000-0000-000000000000","Weight":0,"AvailableUnits":-128,"Packaging":{"Type":"18
     - Carton","Color":" brown 
","NumberPerPackage":0,"RequiresRefridgeration":true,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":null,"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#DataJS.Tests.V4.Dimensions"},"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(2)","@odata.editLink":"Foods(2)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","ProteinGrams
 
@odata.type":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#GeometryCollection"},{"FoodID":3,"Name":"Brown
 
Sugar","UnitPrice":1.6,"ServingSize":1,"MeasurementUnit":"TSP.","ProteinGrams":0,"FatGrams":0,"CarbohydrateGrams":5,"CaloriesPerServing":16,"IsAvailable":true,"ExpirationDate":"2011-12-28T00:00:00Z","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","Weight":4.5,"AvailableUnits":127,"Packaging":null,"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://loca
 
lhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(3)","@odata.editLink":"Foods(3)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#DataJS.Tests.V4.Package","[email protected]":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#GeometryCollection"},{"@odata.type":"#DataJS.Tests.V4.PreparedFood","FoodID":4,"Name":"Cobb
 Salad","UnitPrice":1.99,"ServingSize":-1,"MeasurementUnit":"cups","Pro
 
teinGrams":6,"FatGrams":1,"CarbohydrateGrams":3,"CaloriesPerServing":5,"IsAvailable":true,"ExpirationDate":"2000-12-29T00:00:00Z","ItemGUID":"01234567-89ab-cdef-0123-456789abcdef","Weight":5.674,"AvailableUnits":127,"Packaging":null,"CookedSize":null,"AlternativeNames":[],"Providers":[],"SpatialData":null,"Instructions":"1.)
 Open 2.) 
Eat","NumberOfIngredients":4,"@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(4)","@odata.editLink":"Foods(4)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#
 
DataJS.Tests.V4.Package","[email protected]":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#GeometryCollection","[email protected]":"#String","[email protected]":"#Single"}],"@odata.nextLink":"Foods?$skiptoken=4"}
 },{
   description: "Entry with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)",
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity","FoodID":0,"Name":"flour","UnitPrice":0.19999,"ServingSize":1,"MeasurementUnit":"Cup","ProteinGrams":3,"FatGrams":1,"CarbohydrateGrams":20,"CaloriesPerServing":140,"IsAvailable":true,"ExpirationDate":"2010-12-25T12:00:00Z","ItemGUID":"27272727-2727-2727-2727-272727272727","Weight":10,"AvailableUnits":1,"Packaging":{"Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":79228162514264337593543950335,"Height":32767,"Width":9223372036854775807,"Volume":1.7976931348623157E+308}},"CookedSize":{"Length":2,"Height":1,"Width":3,"Volume":6.0},"AlternativeNames":["ground
 cereal","ground grain"],"Providers":[{"Name":"Flour 
Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001}},{"Name":"Ground
 Grains","Aliases":[],"Details":null}],"Sp
 
atialData":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[5.0,5.0]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}}}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity","@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)","@odata.editLink":"Foods(0)","FoodID":0,"Name":"flour","UnitPrice":0.19999,"[email protected]":"#Decimal","ServingSize":1,"MeasurementUnit":"Cup","[email protected]":"#Byte","ProteinGrams":3,"[email protected]":"#Int16","FatGrams":1,"CarbohydrateGrams":20,"[email protected]":"#Int64","CaloriesPerServing":140,"IsAvailable":true,"[email protected]":"#DateTimeOffset","ExpirationDate":"2010-12-25T12:00:00Z","[email protected]":"#Guid","ItemGUID":"27272727-2727-2727-2727-272727272727","[email protected]":"#Single","Weight":10,"[email protected]":"#SByte","AvailableUnits":1,"Packaging":{"@odata.type":"#DataJS.Tests.V4.Package","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":
 
false,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","Length":7.922816251426434e+28,"[email protected]":"#Int16","Height":32767,"[email protected]":"#Int64","Width":9223372036854776000,"Volume":1.7976931348623157e+308,"[email protected]":"#Int32"},"[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"},"CookedSize":{"@odata.type":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Decimal","Length":2,"[email protected]":"#Int16","Height":1,"[email protected]":"#Int64","Width":3,"Volume":6,"[email protected]":"#Int32"},"[email protected]":"#Collection(String)","AlternativeNames":["ground
 cereal","ground 
grain"],"[email protected]":"#Collection(DataJS.Tests.V4.Provider)","Providers":[{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Flour
 Provider","[email protected]":"#Collection(Strin
 g)","Aliases":["fp1","flour 
provider1"],"Details":{"@odata.type":"#DataJS.Tests.V4.ProviderDetails","Telephone":"555-555-555","PreferredCode":1001,"[email protected]":"#String","[email protected]":"#Int32"},"[email protected]":"#String"},{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Ground
 
Grains","[email protected]":"#Collection(String)","Aliases":[],"Details":null,"[email protected]":"#String"}],"[email protected]":"#GeometryCollection","SpatialData":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[5,5],"[email protected]":"#String"}],"crs":{"type":"name","properties":{"name":"EPSG:4326","[email protected]":"#String"},"[email protected]":"#String"},"[email protected]":"#String"},"[email protected]":"Foods(0)/Category","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity","FoodID":0,"Name":"flour","UnitPrice":0.19999,"ServingSize":1,"MeasurementUnit":"Cup","ProteinGrams":3,"FatGrams":1,"CarbohydrateGrams":20,"CaloriesPerServing":140,"IsAvailable":true,"ExpirationDate":"2010-12-25T12:00:00Z","ItemGUID":"27272727-2727-2727-2727-272727272727","Weight":10,"AvailableUnits":1,"Packaging":{"Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":7.922816251426434e+28,"Height":32767,"Width":9223372036854776000,"Volume":1.7976931348623157e+308,"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","RequiresRefr
 
[email protected]":"#Boolean","[email protected]":"#DateTimeOffset"},"CookedSize":{"Length":2,"Height":1,"Width":3,"Volume":6,"@odata.type":"#DataJS.Tests.V4.CookedDimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"AlternativeNames":["ground
 cereal","ground grain"],"Providers":[{"Name":"Flour 
Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001,"@odata.type":"#DataJS.Tests.V4.ProviderDetails","[email protected]":"#String","[email protected]":"#Int32"},"@odata.type":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#String","[email protected]":"#Collection(String)"},{"Name":"Ground
 
Grains","Aliases":[],"Details":null,"@odata.type":"#Collection(DataJS.Tests.V4.Provider)","[email protected]":"#String","[email protected]":"#Collection(String)","[email protected]":"#DataJS.Tests.V4.ProviderDetails"}],"SpatialData":{"type":"GeometryC
 
ollection","geometries":[{"type":"Point","coordinates":[5,5]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"@odata.type":"#Edm.GeometryCollection"},"@odata.type":"#DataJS.Tests.V4.Food","@odata.id":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)","@odata.editLink":"Foods(0)","[email protected]":"#Int32","[email protected]":"#String","[email protected]":"#Double","[email protected]":"#Decimal","[email protected]":"#String","[email protected]":"#Byte","[email protected]":"#Int16","[email protected]":"#Int32","[email protected]":"#Int64","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset","[email protected]":"#Guid","[email protected]":"#Single","[email protected]":"#SByte","[email protected]":"#Collection(String)","[email protected]":"#Collection(DataJS.Tests.V4.Provider)"}
 },{
   description: "Collection of Complex with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/Providers",
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Providers","value":[{"Name":"Flour
 Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001}},{"Name":"Ground
 Grains","Aliases":[],"Details":null}]}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Providers","@odata.type":"#Collection(DataJS.Tests.V4.Provider)","value":[{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Flour
 Provider","[email protected]":"#Collection(String)","Aliases":["fp1","flour 
provider1"],"Details":{"@odata.type":"#DataJS.Tests.V4.ProviderDetails","Telephone":"555-555-555","PreferredCode":1001,"[email protected]":"#String","[email protected]":"#Int32"},"[email protected]":"#String"},{"@odata.type":"#DataJS.Tests.V4.Provider","Name":"Ground
 
Grains","[email protected]":"#Collection(String)","Aliases":[],"Details":null,"[email protected]":"#String"}]}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Providers","value":[{"Name":"Flour
 Provider","Aliases":["fp1","flour 
provider1"],"Details":{"Telephone":"555-555-555","PreferredCode":1001,"@odata.type":"#DataJS.Tests.V4.ProviderDetails","[email protected]":"#String","[email protected]":"#Int32"},"@odata.type":"#DataJS.Tests.V4.Provider","[email protected]":"#String","[email protected]":"#Collection(String)"},{"Name":"Ground
 
Grains","Aliases":[],"Details":null,"@odata.type":"#DataJS.Tests.V4.Provider","[email protected]":"#String","[email protected]":"#Collection(String)","[email protected]":"#DataJS.Tests.V4.ProviderDetails"}],"@odata.type":"#Collection(DataJS.Tests.V4.Provider)"}
 },{
   description: "Collection of Simple with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/AlternativeNames",
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/AlternativeNames","value":["ground
 cereal","ground grain"]}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/AlternativeNames","@odata.type":"#Collection(String)","value":["ground
 cereal","ground grain"]}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/AlternativeNames","value":["ground
 cereal","ground grain"],"@odata.type":"#Collection(String)"}
 },{
   description: "Collection Property with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
   usedUrl: 
"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)/Packaging",
   input:   
'{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Packaging","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":79228162514264337593543950335,"Height":32767,"Width":9223372036854775807,"Volume":1.7976931348623157E+308}}',
-  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Packaging","@odata.type":"#DataJS.Tests.V4.Package","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"[email protected]":"#DateTimeOffset","ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","Length":7.922816251426434e+28,"[email protected]":"#Int16","Height":32767,"[email protected]":"#Int64","Width":9223372036854776000,"Volume":1.7976931348623157e+308,"[email protected]":"#Int32"},"[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean"}
+  expected: 
{"@odata.context":"http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods(0)/Packaging","Type":null,"Color":"","NumberPerPackage":2147483647,"RequiresRefridgeration":false,"ShipDate":"2000-12-29T00:00:00Z","PackageDimensions":{"Length":7.922816251426434e+28,"Height":32767,"Width":9223372036854776000,"Volume":1.7976931348623157e+308,"@odata.type":"#DataJS.Tests.V4.Dimensions","[email protected]":"#Decimal","[email protected]":"#Int16","[email protected]":"#Int64","[email protected]":"#Double"},"@odata.type":"#DataJS.Tests.V4.Package","[email protected]":"#String","[email protected]":"#String","[email protected]":"#Int32","[email protected]":"#Boolean","[email protected]":"#DateTimeOffset"}
 },{
   description: "Simple Property with metadata=minimal",
   header:  "application/json;odata.metadata=minimal",
@@ -355,59 +411,25 @@ var testDataJsonParser1= [
 describe('TEST odata-json.js', function() {
     describe('with odata.metadata=none', function() {
         for( var i = 0; i < testDataJsonParserMetadataNone.length;i++) {
-          var testData = testDataJsonParserMetadataNone[i];
-          var context =  { 
-            response: { requestUri: testData.usedUrl }, 
-            contentType : { properties : { "odata.metadata" : 'none'}},
-            dataServiceVersion: "4.0" 
-          };
-          it(testData.description, function () {
-            callTest(testData,context);
-          });
+            callTest_None(testDataJsonParserMetadataNone[i],context);
         }
     });
 
     describe('with odata.metadata=minimal', function() {
         for( var i = 0; i < testDataJsonParserMetadataMinimal.length;i++) {
-          var testData = testDataJsonParserMetadataMinimal[i];
-          var context =  { 
-            response: { requestUri: testData.usedUrl }, 
-            contentType : { properties : { "odata.metadata" : 'minimal'}},
-            dataServiceVersion: "4.0" 
-          };
-          it(testData.description, function () {
-            callTest(testData,context);
-          });
+            callTest_Minimal(testDataJsonParserMetadataMinimal[i],context);
         }
     });
 
     describe('with odata.metadata=minimal to full', function() {
         for( var i = 0; i < 
testDataJsonParserMetadataMinimalToFull.length;i++) {
-          var testData = testDataJsonParserMetadataMinimalToFull[i];
-          var context =  { 
-            response: { requestUri: testData.usedUrl }, 
-            contentType : { properties : { "odata.metadata" : 'minimal'}},
-            dataServiceVersion: "4.0",
-            metadata : testDataJsonParserMetadataMinimalToFullMetaData
-          };
-
-          it(testData.description, function () {
-            callTest(testData,context);
-          });
+            
callTest_MinimalToFull(testDataJsonParserMetadataMinimalToFull[i],context);
         }
     });
 
     describe('with odata.metadata=full', function() {
         for( var i = 0; i < testDataJsonParserMetadataFull.length;i++) {
-          var testData = testDataJsonParserMetadataFull[i];
-          var context =  { 
-            response: { requestUri: testData.usedUrl }, 
-            contentType : { properties : { "odata.metadata" : 'full'}},
-            dataServiceVersion: "4.0" 
-          };
-          it(testData.description, function () {
-            callTest(testData,context);
-          });
+            callTest_Full(testDataJsonParserMetadataFull[i],context);
         }
     });
 });
\ No newline at end of file

Reply via email to