OpenLayers OpenLayers

Changeset 6545

Show
Ignore:
Timestamp:
03/17/08 16:45:27 (10 months ago)
Author:
tschaub
Message:

updating sld tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/topp/geoext/tests/Format/test_SLD.html

    r6463 r6545  
    1818 
    1919    function test_Format_SLD_read(t) { 
    20         t.plan(5); 
    21         var styles = new OpenLayers.Format.SLD().read(this.test_content, 
    22                 {withNamedLayer: true}); 
     20        t.plan(4); 
     21        var sld = new OpenLayers.Format.SLD().read(this.test_content); 
    2322         
    24         var testLayer = styles[1].TestLayer; 
     23        var testLayer = sld.namedLayers["TestLayer"]; 
     24        var userStyles = testLayer.userStyles; 
    2525         
    26         t.ok(testLayer.foo != undefined, "SLD correctly reads a UserStyle named \"foo\""); 
    27         t.eq(testLayer.foo.rules.length, 1, "The number of rules for the UserStyle is correct"); 
    28         t.eq(testLayer.foo.rules[0].name, "bar", "The first rule's name is \"bar\""); 
    29         t.eq(testLayer.foo.rules[0].symbolizer.Polygon.fillColor, "blue", "The fillColor for the Polygon symbolizer is correct"); 
    30         t.eq(testLayer.foo.name, styles[0][0].name, "The content hash of the Format contains the correct rules."); 
     26        t.eq(userStyles[0].name, "foo", "SLD correctly reads a UserStyle named 'foo'"); 
     27        t.eq(userStyles[0].rules.length, 1, "The number of rules for the UserStyle is correct"); 
     28        t.eq(userStyles[0].rules[0].name, "bar", "The first rule's name is 'bar'"); 
     29        t.eq(userStyles[0].rules[0].symbolizer.Polygon.fillColor, "blue", "The fillColor for the Polygon symbolizer is correct"); 
    3130    } 
    3231