From 263dcbd188441fef875c3422e354dbe32d5f6afb Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Fri, 2 Nov 2012 15:56:29 +0100 Subject: [PATCH] test ferry durations --- features/bicycle/ferry.feature | 87 +++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/features/bicycle/ferry.feature b/features/bicycle/ferry.feature index e7846f64d..ca95d163e 100644 --- a/features/bicycle/ferry.feature +++ b/features/bicycle/ferry.feature @@ -4,7 +4,7 @@ Feature: Bike - Handle ferry routes Background: Given the speedprofile "bicycle" - Scenario: Bike - Use a ferry route + Scenario: Bike - Ferry route Given the node map | a | b | c | | | | | | d | | | @@ -27,4 +27,89 @@ Feature: Bike - Handle ferry routes | c | f | cde,efg | | c | g | cde,efg | + Scenario: Bike - Ferry duration, single node + Given the node map + | a | b | c | d | + | | | e | f | + | | | g | h | + | | | i | j | + + And the ways + | nodes | highway | route | bicycle | duration | + | ab | primary | | | | + | cd | primary | | | | + | ef | primary | | | | + | gh | primary | | | | + | ij | primary | | | | + | bc | | ferry | yes | 0:01 | + | be | | ferry | yes | 0:10 | + | bg | | ferry | yes | 1:00 | + | bi | | ferry | yes | 10:00 | + Scenario: Bike - Ferry duration, multiple nodes + Given the node map + | x | | | | | y | + | | a | b | c | d | | + + And the ways + | nodes | highway | route | bicycle | duration | + | xa | primary | | | | + | yd | primary | | | | + | abcd | | ferry | yes | 1:00 | + + 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 |