diff options
Diffstat (limited to 'misc/openlayers/tests/Symbolizer/Polygon.html')
-rw-r--r-- | misc/openlayers/tests/Symbolizer/Polygon.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/misc/openlayers/tests/Symbolizer/Polygon.html b/misc/openlayers/tests/Symbolizer/Polygon.html new file mode 100644 index 0000000..ebea5ea --- /dev/null +++ b/misc/openlayers/tests/Symbolizer/Polygon.html @@ -0,0 +1,44 @@ +<html> +<head> + <script src="../OLLoader.js"></script> + <script type="text/javascript"> + + function test_constructor(t) { + t.plan(3); + + var symbolizer = new OpenLayers.Symbolizer.Polygon({foo: "bar"}); + + t.ok(symbolizer instanceof OpenLayers.Symbolizer, "instance of OpenLayers.Symbolizer"); + t.ok(symbolizer instanceof OpenLayers.Symbolizer.Polygon, "instance of OpenLayers.Symbolizer.Polygon"); + t.eq(symbolizer.foo, "bar", "constructor applies config properties"); + + } + + function test_clone(t) { + t.plan(2); + + var symbolizer = new OpenLayers.Symbolizer.Polygon({foo: "bar"}); + var clone = symbolizer.clone(); + + t.ok(clone instanceof OpenLayers.Symbolizer.Polygon, "correct type"); + t.eq(clone.foo, "bar", "clone copies properties"); + + } + + function test_defaults(t) { + t.plan(7); + var symbolizer = new OpenLayers.Symbolizer.Polygon(); + t.ok(symbolizer.strokeColor === undefined, "no default strokeColor"); + t.ok(symbolizer.strokeOpacity === undefined, "no default strokeOpacity"); + t.ok(symbolizer.strokeWidth === undefined, "no default strokeWidth"); + t.ok(symbolizer.strokeLinecap === undefined, "no default strokeLinecap"); + t.ok(symbolizer.strokeDashstyle === undefined, "no default strokeDashstyle"); + t.ok(symbolizer.fillColor === undefined, "no default fillColor"); + t.ok(symbolizer.fillOpacity === undefined, "no default fillOpacity"); + } + + + </script> +</head> +<body></body> +</html> |