implement ISO 8601 durations parsing, cf. #1399

This commit is contained in:
Dennis Luxen
2015-03-02 16:41:03 +01:00
parent 73a2a938b4
commit 7e00a86bb4
4 changed files with 250 additions and 36 deletions
+20 -1
View File
@@ -27,7 +27,7 @@ Feature: Car - Handle ferry routes
| c | f | cde,efg | 2,1 |
| c | g | cde,efg | 2,1 |
Scenario: Car - Properly handle durations
Scenario: Car - Properly handle simple durations
Given the node map
| a | b | c | | |
| | | d | | |
@@ -45,3 +45,22 @@ Feature: Car - Handle ferry routes
| b | f | abc,cde,efg | 1,2,1 | 20 km/h |
| c | e | cde | 2 | 12 km/h |
| e | c | cde | 2 | 12 km/h |
Scenario: Car - Properly handle ISO 8601 durations
Given the node map
| a | b | c | | |
| | | d | | |
| | | e | f | g |
And the ways
| nodes | highway | route | duration |
| abc | primary | | |
| cde | | ferry | PT1M |
| efg | primary | | |
When I route I should get
| from | to | route | modes | speed |
| a | g | abc,cde,efg | 1,2,1 | 26 km/h |
| b | f | abc,cde,efg | 1,2,1 | 20 km/h |
| c | e | cde | 2 | 12 km/h |
| e | c | cde | 2 | 12 km/h |