[OpenLayers-Commits] r4218 - in trunk/openlayers/tests: . Tile
commits at openlayers.org
commits at openlayers.org
Tue Sep 11 10:46:56 EDT 2007
Author: crschmidt
Date: 2007-09-11 10:46:55 -0400 (Tue, 11 Sep 2007)
New Revision: 4218
Added:
trunk/openlayers/tests/Tile/test_WFS.html
Modified:
trunk/openlayers/tests/list-tests.html
Log:
Add Tile_WFS tests -- just a pretty much empty wrapper at the moment.
Added: trunk/openlayers/tests/Tile/test_WFS.html
===================================================================
--- trunk/openlayers/tests/Tile/test_WFS.html (rev 0)
+++ trunk/openlayers/tests/Tile/test_WFS.html 2007-09-11 14:46:55 UTC (rev 4218)
@@ -0,0 +1,59 @@
+<html>
+<head>
+ <script src="../../lib/OpenLayers.js"></script>
+ <script type="text/javascript">
+ var tile;
+
+ function test_01_Tile_WFS_constructor (t) {
+ t.plan( 8 );
+
+ var layer = {}; // bogus layer
+ var position = new OpenLayers.Pixel(10,20);
+ var bounds = new OpenLayers.Bounds(1,2,3,4);
+ var url = "bobob";
+ var size = new OpenLayers.Size(5,6);
+
+ tile = new OpenLayers.Tile.WFS(layer, position, bounds, url, size);
+
+ t.ok( tile instanceof OpenLayers.Tile.WFS, "new OpenLayers.Tile.WFS returns Tile.WFS object" );
+ t.eq( tile.layer, layer, "tile.layer set correctly");
+ t.ok( tile.position.equals(position), "tile.position set correctly");
+ t.ok( tile.bounds.equals(bounds), "tile.bounds set correctly");
+ t.eq( tile.url, url, "tile.url set correctly");
+ t.ok( tile.size.equals(size), "tile.size is set correctly" );
+
+ t.ok( tile.id != null, "tile is given an id");
+ t.ok( tile.events != null, "tile's events intitialized");
+ }
+
+ function test_99_Tile_WFS_destroy(t) {
+ t.plan( 6 );
+
+ var layer = {}; // bogus layer
+ var position = new OpenLayers.Pixel(10,20);
+ var bounds = new OpenLayers.Bounds(1,2,3,4);
+ var url = "bobob";
+ var size = new OpenLayers.Size(5,6);
+
+ tile = new OpenLayers.Tile.WFS(layer, position, bounds, url, size);
+ tile.events.destroy = function() {
+ t.ok(true, "tile events destroy() called");
+ };
+
+
+ tile.destroy();
+
+ t.ok(tile.layer == null, "tile.layer set to null");
+ t.ok(tile.bounds == null, "tile.bounds set to null");
+ t.ok(tile.size == null, "tile.size set to null");
+ t.ok(tile.position == null, "tile.position set to null");
+
+ t.ok(tile.events == null, "tile.events set to null");
+ }
+
+ </script>
+</head>
+<body>
+</body>
+</html>
+
Modified: trunk/openlayers/tests/list-tests.html
===================================================================
--- trunk/openlayers/tests/list-tests.html 2007-09-11 14:26:08 UTC (rev 4217)
+++ trunk/openlayers/tests/list-tests.html 2007-09-11 14:46:55 UTC (rev 4218)
@@ -59,6 +59,7 @@
<li>Layer/test_WrapDateLine.html</li>
<li>test_Tile.html</li>
<li>Tile/test_Image.html</li>
+ <li>Tile/test_WFS.html</li>
<li>test_Control.html</li>
<li>Control/test_SelectFeature.html</li>
<li>Control/test_DragFeature.html</li>
More information about the Commits
mailing list