Skip to content

Commit 5c858a7

Browse files
Xavier CarribaXavier Carriba
authored andcommitted
Implementing BDD scenarios
1 parent d14e354 commit 5c858a7

63 files changed

Lines changed: 1147 additions & 397 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

features/read/kml/parse_document.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ 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 'LibKml\Domain\Feature\Container\Document'
10-
And the Document should contain the following properties:
9+
Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Container\Document'
10+
And the feature Document should contain the following properties:
1111
| property | value |
1212
| id | document-1 |
1313
| targetId | target-1 |

features/read/kml/parse_folder.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ 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 'LibKml\Domain\Feature\Container\Folder'
10-
And the Folder should contain the following properties:
9+
Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Container\Folder'
10+
And the feature Folder should contain the following properties:
1111
| property | value |
1212
| id | folder-1 |
1313
| targetId | target-1 |

features/read/kml/parse_ground_overlay.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +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 'LibKml\Domain\Feature\Overlay\GroundOverlay'
10-
And the GroundOverlay should contain the following properties:
9+
Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Overlay\GroundOverlay'
10+
And the feature GroundOverlay should contain the following properties:
1111
| property | value |
1212
| name | Large-scale overlay on terrain |
13-
| visibility | false |
13+
| visibility | false |

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 'LibKml\Domain\Feature\NetworkLink'
10-
And the NetworkLink should contain the following properties:
9+
Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\NetworkLink'
10+
And the feature NetworkLink should contain the following properties:
1111
| property | value |
1212
| name | Open NetworkLink |
1313
| open | true |

features/read/kml/parse_network_link_control.feature

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: Parse <NetworkLinkControl>
66
Scenario:
77
Given a KML document with a NetworkLinkControl in "tests/kml/network-link-control.kml"
88
When I parse the KML document
9-
Then I should get a KmlDocument object containing one 'LibKml\Domain\FieldType\NetworkLinkControl'
9+
Then I should get a KmlDocument object containing one NetworkLinkControl
1010
And the NetworkLinkControl should contain the following properties:
1111
| property | value |
1212
| minRefreshPeriod | 60 |
@@ -17,3 +17,11 @@ Feature: Parse <NetworkLinkControl>
1717
| linkDescription | Link description |
1818
| linkSnippet | Link snippet |
1919
| expires | 2323198129301 |
20+
And the NetworkLinkControl should have an AbstractView with the following properties:
21+
| property | value |
22+
| longitude | -1.345 |
23+
| latitude | 34.5642 |
24+
| altitude | 125.45 |
25+
| heading | 98.54 |
26+
| tilt | -15.78 |
27+
| roll | 5.67 |

features/read/kml/parse_photo_overlay.feature

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ 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 'LibKml\Domain\Feature\Overlay\PhotoOverlay'
10-
And the Placemark should contain the following properties:
11-
| property | value |
12-
| id | photoOverlay1 |
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 feature 'LibKml\Domain\Feature\Overlay\PhotoOverlay'
10+
And the feature Placemark should contain the following properties:
11+
| property | value |
12+
| id | photo-overlay-1 |
13+
| targetId | target-1 |
14+
| name | Seattle Space Needle |
15+
| visibility | false |
16+
| address | Blackfriards 240 |
17+
| phoneNumber | tel:+44 7890123456789 |
18+
| snippet | <a href="#space-needle">Fly into picture</a> |
19+
| styleUrl | #myIconStyle |

features/read/kml/parse_placemark.feature

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@ 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 'LibKml\Domain\Feature\Placemark'
10-
And the Placemark should contain the following properties:
9+
Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Placemark'
10+
And the feature Placemark should contain the following properties:
1111
| property | value |
1212
| id | placemark1 |
1313
| targetId | target1 |
1414
| name | My office |
15-
| visibility | true |
15+
| visibility | false |
1616
| address | Blackfriards 240 |
1717
| phoneNumber | tel:+44 7890123456789 |
1818
| snippet | Office location |
1919
| styleUrl | #myIconStyle |
20+
And the feature should contain a LookAt object with the the following properties:
21+
| property | value |
22+
| longitude | 1.67 |
23+
| latitude | 15.678 |
24+
| altitude | 50 |
25+
| heading | 57.85 |
26+
| tilt | -10.5 |
27+
| range | 345.8 |
28+
| altitudeMode | absolute |

features/read/kml/parse_screen_overlay.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ 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 'LibKml\Domain\Feature\Overlay\ScreenOverlay'
10-
And the ScreenOverlay should contain the following properties:
9+
Then I should get a KmlDocument object containing one feature 'LibKml\Domain\Feature\Overlay\ScreenOverlay'
10+
And the feature ScreenOverlay should contain the following properties:
1111
| property | value |
12-
| id | screenOverlay1 |
13-
| targetId | target1 |
14-
| name | My office |
15-
| visibility | 1 |
12+
| id | screen-overlay-1 |
13+
| targetId | target-1 |
14+
| name | Centered icon |
15+
| visibility | false |
1616
| address | Blackfriards 240 |
1717
| phoneNumber | tel:+44 7890123456789 |
1818
| snippet | Office location |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Feature: Parse <TimeSpan>
2+
In order to manipulate a KML document
3+
As an user
4+
I need <TimeSpan> tag to be parsed as a TimeSpan object
5+
6+
Scenario:
7+
Given a KML document with a NetworkLinkControl in "tests/kml/time-span.kml"
8+
When I parse the KML document
9+
Then I should get a KmlDocument object containing one NetworkLinkControl
10+
And the NetworkLinkControl should contain a Camera with a 'TimeSpan' TimePrimitive property
11+
And the TimeSpan object should contain the following properties:
12+
| property | value |
13+
| begin | 2021-09-12T15:07:35.678 |
14+
| end | 2021-09-12T16:14:18.765 |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Feature: Parse <TimeStamp>
2+
In order to manipulate a KML document
3+
As an user
4+
I need <TimeStamp> tag to be parsed as a TimeStamp object
5+
6+
Scenario:
7+
Given a KML document with a NetworkLinkControl in "tests/kml/time-span.kml"
8+
When I parse the KML document
9+
Then I should get a KmlDocument object containing one NetworkLinkControl
10+
And the NetworkLinkControl should contain a Camera with a 'TimeStamp' TimePrimitive property
11+
And the TimeStamp object should contain the following properties:
12+
| property | value |
13+
| when | 2021-09-12T15:07:35.678 |

0 commit comments

Comments
 (0)