Skip to content

Commit c08c06e

Browse files
committed
Implementing acceptance tests
1 parent cfd0526 commit c08c06e

13 files changed

Lines changed: 80 additions & 73 deletions

features/read/kml/parse_document.feature

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ Feature: Parse <Document>
66
Scenario:
77
Given a KML document with a Document in "tests/kml/document.kml"
88
When I parse the KML document
9-
Then I should get a KmlDocument object containing one Document
9+
Then I should get a KmlDocument object containing one 'LibKml\Domain\Feature\Container\Document'
1010
And the Document should contain the following properties:
1111
| property | value |
12-
| id | document1 |
13-
| targetId | target1 |
14-
| name | My office |
15-
| visibility | 1 |
16-
| address | Blackfriards 240 |
17-
| phoneNumber | tel:+44 7890123456789 |
18-
| snippet | Office location |
19-
| styleUrl | #myIconStyle |
12+
| id | document-1 |
13+
| targetId | target-1 |
14+
| name | Document with XML id |
15+
| open | true |

features/read/kml/parse_folder.feature

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ Feature: Parse <Folder>
66
Scenario:
77
Given a KML document with a Folder in "tests/kml/folder.kml"
88
When I parse the KML document
9-
Then I should get a KmlDocument object containing one Folder
10-
And the Folder will have the following properties:
9+
Then I should get a KmlDocument object containing one 'LibKml\Domain\Feature\Container\Folder'
10+
And the Folder should contain the following properties:
1111
| property | value |
12-
| id | folder1 |
13-
| targetId | target1 |
14-
| name | My office |
15-
| visibility | 1 |
16-
| address | Blackfriards 240 |
17-
| phoneNumber | tel:+44 7890123456789 |
18-
| snippet | Office location |
19-
| styleUrl | #myIconStyle |
12+
| id | folder-1 |
13+
| targetId | target-1 |
14+
| name | Document with XML id |
15+
| open | true |

features/read/kml/parse_ground_overlay.feature

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@ Feature: Parse <GroundOverlay>
66
Scenario:
77
Given a KML document with a GroundOverlay in "tests/kml/ground-overlay.kml"
88
When I parse the KML document
9-
Then I should get a KmlDocument object containing one GroundOverlay
10-
And the GroundOverlay will have the following properties:
11-
| property | value |
12-
| id | groundOverlay1 |
13-
| targetId | target1 |
14-
| name | My office |
15-
| visibility | 1 |
16-
| address | Blackfriards 240 |
17-
| phoneNumber | tel:+44 7890123456789 |
18-
| snippet | Office location |
19-
| styleUrl | #myIconStyle |
9+
Then I should get a KmlDocument object containing one 'LibKml\Domain\Feature\Overlay\GroundOverlay'
10+
And the GroundOverlay should contain the following properties:
11+
| property | value |
12+
| name | Large-scale overlay on terrain |
13+
| visibility | true |

features/read/kml/parse_kml.feature

Lines changed: 0 additions & 19 deletions
This file was deleted.

features/read/kml/parse_network_link.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Feature: Parse <NetworkLink>
66
Scenario:
77
Given a KML document with a NetworkLink in "tests/kml/network-link.kml"
88
When I parse the KML document
9-
Then I should get a KmlDocument object containing one NetworkLink
10-
And the NetworkLink should have the following properties:
9+
Then I should get a KmlDocument object containing one 'LibKml\Domain\Feature\Overlay\NetworkLink'
10+
And the NetworkLink should contain the following properties:
1111
| property | value |
1212
| id | networkLink1 |
1313
| targetId | target1 |

features/read/kml/parse_network_link_control.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Feature: Parse <NetworkLinkControl>
44
I need <NetworkLinkControl> tag to be parsed as a NetworkLinkControl object
55

66
Scenario:
7-
Given a KML document with a NetworkLinkControl in "tests/kml/network-link.kml"
7+
Given a KML document with a NetworkLinkControl in "tests/kml/network-link-control.kml"
88
When I parse the KML document
99
Then I should get a KmlDocument object containing one NetworkLinkControl
10-
And the NetworkLinkControl should have the following properties:
10+
And the NetworkLinkControl should contain the following properties:
1111
| property | value |
1212
| minRefreshPeriod | 60 |
1313
| maxSessionLength | 3600 |

features/read/kml/parse_photo_overlay.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Feature: Parse <PhotoOverlay>
66
Scenario:
77
Given a KML document with a PhotoOverlay in "tests/kml/photo-overlay.kml"
88
When I parse the KML document
9-
Then I should get a KmlDocument object containing one PhotoOverlay
10-
And the Placemark should have the following properties:
9+
Then I should get a KmlDocument object containing one 'LibKml\Domain\Feature\Overlay\PhotoOverlay'
10+
And the Placemark should contain the following properties:
1111
| property | value |
1212
| id | photoOverlay1 |
1313
| targetId | target1 |

features/read/kml/parse_placemark.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Feature: Parse <Placemark>
66
Scenario:
77
Given a KML document with a Placemark in "tests/kml/placemark.kml"
88
When I parse the KML document
9-
Then I should get a KmlDocument object containing one Placemark
10-
And the Placemark should have the following properties:
9+
Then I should get a KmlDocument object containing one 'LibKml\Domain\Feature\Placemark'
10+
And the Placemark should contain the following properties:
1111
| property | value |
1212
| id | placemark1 |
1313
| targetId | target1 |

features/read/kml/parse_screen_overlay.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Feature: Parse <ScreenOverlay>
66
Scenario:
77
Given a KML document with a ScreenOverlay in "tests/kml/screen-overlay.kml"
88
When I parse the KML document
9-
Then I should get a KmlDocument object containing one ScreenOverlay
10-
And the ScreenOverlay should have the following properties:
9+
Then I should get a KmlDocument object containing one 'LibKml\Domain\Feature\Overlay\ScreenOverlay'
10+
And the ScreenOverlay should contain the following properties:
1111
| property | value |
1212
| id | screenOverlay1 |
1313
| targetId | target1 |

tests/kml/document.kml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<kml xmlns="http://www.opengis.net/kml/2.2">
3-
<Document id="hasId">
3+
<Document id="document-1" targetId="target-1">
44
<name>Document with XML id</name>
55
<open>1</open>
66
<Folder>

0 commit comments

Comments
 (0)