update ferry tests

This commit is contained in:
Emil Tin
2013-01-01 18:41:38 +01:00
parent 0f4207f85e
commit ff417fac01
2 changed files with 147 additions and 106 deletions
+1 -74
View File
@@ -60,77 +60,4 @@ Feature: Bike - Handle ferry routes
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s +-1 |
| d | a | abcd | 3600s +-1 |
Scenario: Bike - Ferry duration, connected routes
Given the node map
| x | | | | | | | | y |
| | a | b | c | d | e | f | g | |
And the ways
| nodes | highway | route | bicycle | duration |
| xa | primary | | | |
| yg | primary | | | |
| abcd | | ferry | yes | 0:30 |
| defg | | ferry | yes | 0:30 |
When I route I should get
| from | to | route | time |
| a | g | abcd,defg | 3600s +-1 |
| g | a | defg,abcd | 3600s +-1 |
Scenario: Bike - Prefer road when faster than ferry
Given the node map
| x | a | b | c | |
| | | | | d |
| y | g | f | e | |
And the ways
| nodes | highway | route | bicycle | duration |
| xa | primary | | | |
| yg | primary | | | |
| xy | primary | | | |
| abcd | | ferry | yes | 0:01 |
| defg | | ferry | yes | 0:01 |
When I route I should get
| from | to | route | time |
| a | g | xa,xy,yg | 60s +-25% |
| g | a | yg,xy,xa | 60s +-25% |
Scenario: Bike - Long winding ferry route
Given the node map
| x | | b | | d | | f | | y |
| | a | | c | | e | | g | |
And the ways
| nodes | highway | route | bicycle | duration |
| xa | primary | | | |
| yg | primary | | | |
| abcdefg | | ferry | yes | 6:30 |
When I route I should get
| from | to | route | time |
| a | g | abcdefg | 23400s +-1 |
| g | a | abcdefg | 23400s +-1 |
@todo
Scenario: Bike - Ferry duration, individual parts
Given the node map
| x | y | | z | | | v |
| a | b | | c | | | d |
And the ways
| nodes | highway | route | bicycle | duration |
| xa | primary | | | |
| yb | primary | | | |
| zc | primary | | | |
| vd | primary | | | |
| abcd | | ferry | yes | 1:00 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s +-1 |
| a | b | abcd | 600s +-1 |
| b | c | abcd | 1200s +-1 |
| c | d | abcd | 1800s +-1 |
| d | a | abcd | 3600s +-1 |