Files
openlayers/tests/Rule.html
2008-03-31 05:03:49 +00:00

30 lines
782 B
HTML

<html>
<head>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_Rule_constructor(t) {
t.plan(3);
var options = {'foo': 'bar'};
var rule = new OpenLayers.Rule(options);
t.ok(rule instanceof OpenLayers.Rule,
"new OpenLayers.Rule returns object" );
t.eq(rule.foo, "bar", "constructor sets options correctly");
t.eq(typeof rule.evaluate, "function", "rule has an evaluate function");
}
function test_Rule_destroy(t) {
t.plan(1);
var rule = new OpenLayers.Rule();
rule.destroy();
t.eq(rule.symbolizer, null, "symbolizer hash nulled properly");
}
</script>
</head>
<body>
</body>
</html>