|
| 1 | +Feature: Parse <Document> |
| 2 | + In order to manipulate a KML document |
| 3 | + As an user |
| 4 | + I need <Document> tag to be parsed as a Document object |
| 5 | + |
| 6 | + Scenario: Style with a Balloon |
| 7 | + Given a KML document with a Document in "tests/kml/document.kml" |
| 8 | + When I parse the KML document |
| 9 | + Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Container\Document' |
| 10 | + And the feature should contain a Style object with the following properties: |
| 11 | + | property | value | |
| 12 | + | id | style-1 | |
| 13 | + | targetId | target-1 | |
| 14 | + And the Style should contain a BalloonStyle with the following properties: |
| 15 | + | property | value | |
| 16 | + | bgColor | ffffffbb | |
| 17 | + | textColor | ff00aabb | |
| 18 | + | text | $[name] | |
| 19 | + | displayMode | random | |
| 20 | + |
| 21 | + Scenario: Style with a IconStyle |
| 22 | + Given a KML document with a Document in "tests/kml/document.kml" |
| 23 | + When I parse the KML document |
| 24 | + Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Container\Document' |
| 25 | + And the feature should contain a Style object with the following properties: |
| 26 | + | property | value | |
| 27 | + | id | style-1 | |
| 28 | + | targetId | target-1 | |
| 29 | + And the Style should contain a IconStyle with the following properties: |
| 30 | + | property | value | |
| 31 | + | color | ff00bbcc | |
| 32 | + | colorMode | random | |
| 33 | + | scale | 0.5 | |
| 34 | + | heading | 2.56 | |
| 35 | + |
| 36 | + Scenario: Style with a LabelStyle |
| 37 | + Given a KML document with a Document in "tests/kml/document.kml" |
| 38 | + When I parse the KML document |
| 39 | + Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Container\Document' |
| 40 | + And the feature should contain a Style object with the following properties: |
| 41 | + | property | value | |
| 42 | + | id | style-1 | |
| 43 | + | targetId | target-1 | |
| 44 | + And the Style should contain a LabelStyle with the following properties: |
| 45 | + | property | value | |
| 46 | + | color | ffaabbcc | |
| 47 | + | colorMode | random | |
| 48 | + | scale | 0.75 | |
| 49 | + | heading | 56.42 | |
| 50 | + |
| 51 | + Scenario: Style with a LineStyle |
| 52 | + Given a KML document with a Document in "tests/kml/document.kml" |
| 53 | + When I parse the KML document |
| 54 | + Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Container\Document' |
| 55 | + And the feature should contain a Style object with the following properties: |
| 56 | + | property | value | |
| 57 | + | id | style-1 | |
| 58 | + | targetId | target-1 | |
| 59 | + And the Style should contain a LineStyle with the following properties: |
| 60 | + | property | value | |
| 61 | + | color | ffddbbcc | |
| 62 | + | colorMode | random | |
| 63 | + | width | 2.75 | |
| 64 | + |
| 65 | + Scenario: Style with a ListStyle |
| 66 | + Given a KML document with a Document in "tests/kml/document.kml" |
| 67 | + When I parse the KML document |
| 68 | + Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Container\Document' |
| 69 | + And the feature should contain a Style object with the following properties: |
| 70 | + | property | value | |
| 71 | + | id | style-1 | |
| 72 | + | targetId | target-1 | |
| 73 | + And the Style should contain a ListStyle with the following properties: |
| 74 | + | property | value | |
| 75 | + | listItemType | radioFolder | |
| 76 | + | bgColor | 55aabbcc | |
| 77 | + |
| 78 | + Scenario: Style with a PolyStyle |
| 79 | + Given a KML document with a Document in "tests/kml/document.kml" |
| 80 | + When I parse the KML document |
| 81 | + Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Container\Document' |
| 82 | + And the feature should contain a Style object with the following properties: |
| 83 | + | property | value | |
| 84 | + | id | style-1 | |
| 85 | + | targetId | target-1 | |
| 86 | + And the Style should contain a PolyStyle with the following properties: |
| 87 | + | property | value | |
| 88 | + | color | ffddaa00 | |
| 89 | + | colorMode | random | |
| 90 | + | fill | 0 | |
| 91 | + | outline | 0 | |
0 commit comments