[OpenLayers-Commits] r10931 - in sandbox/bartvde/openls/openlayers/tests: . Format Format/XLS

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Tue Nov 30 05:34:17 EST 2010


Author: bartvde
Date: 2010-11-30 02:34:17 -0800 (Tue, 30 Nov 2010)
New Revision: 10931

Added:
   sandbox/bartvde/openls/openlayers/tests/Format/XLS/
   sandbox/bartvde/openls/openlayers/tests/Format/XLS/v1_1_0.html
Modified:
   sandbox/bartvde/openls/openlayers/tests/list-tests.html
Log:
adding test

Added: sandbox/bartvde/openls/openlayers/tests/Format/XLS/v1_1_0.html
===================================================================
--- sandbox/bartvde/openls/openlayers/tests/Format/XLS/v1_1_0.html	                        (rev 0)
+++ sandbox/bartvde/openls/openlayers/tests/Format/XLS/v1_1_0.html	2010-11-30 10:34:17 UTC (rev 10931)
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <script src="../../../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+    function test_write(t) {
+        t.plan(1);
+
+        var format = new OpenLayers.Format.XLS();
+        var address = {
+            countryCode: 'US',
+            street: '1 Freedom Rd',
+            municipality: 'Providence',
+            countrySubdivision: 'RI',
+            postalCode: '02909'
+        };
+        var request = format.write({addresses: [address]});
+
+        var expected = '<xls:XLS xmlns:xls="http://www.opengis.net/xls" version="1.1" xsi:schemaLocation="http://www.opengis.net/xls http://schemas.opengis.net/ols/1.1.0/LocationUtilityService.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><xls:RequestHeader/><xls:Request methodName="GeocodeRequest" requestID="" version="1.1"><xls:GeocodeRequest><xls:Address countryCode="US"><xls:StreetAddress><xls:Street>1 Freedom Rd</xls:Street></xls:StreetAddress><xls:Place type="Municipality">Providence</xls:Place><xls:Place type="CountrySubdivision">RI</xls:Place><xls:PostalCode>02909</xls:PostalCode></xls:Address></xls:GeocodeRequest></xls:Request></xls:XLS>';
+
+        t.xml_eq(request, expected, "XLS geocode request correctly written");
+    }
+
+    </script>
+</head>
+<body>
+</body>
+</html>

Modified: sandbox/bartvde/openls/openlayers/tests/list-tests.html
===================================================================
--- sandbox/bartvde/openls/openlayers/tests/list-tests.html	2010-11-30 09:46:18 UTC (rev 10930)
+++ sandbox/bartvde/openls/openlayers/tests/list-tests.html	2010-11-30 10:34:17 UTC (rev 10931)
@@ -96,6 +96,7 @@
     <li>Format/SOSGetObservation.html</li>
     <li>Format/SOSGetFeatureOfInterest.html</li>
     <li>Format/OWSContext/v0_3_1.html</li>
+    <li>Format/XLS/v1_1_0.html</li>
     <li>Format/XML.html</li>
     <li>Geometry.html</li>
     <li>Geometry/Collection.html</li>



More information about the Commits mailing list