This repository has been archived by the owner on Aug 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nfm64.feature
114 lines (112 loc) · 4.24 KB
/
nfm64.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Feature: The fare from origin to destination must not be cheaper than the fare from ORP to destination or origin to DRP
# Stonegate to Dover Priory via Hastings and Ashford
Scenario: Journey is not within 3 miles of the shortest distance and has an appropriate fare
Given a journey:
| SOG | depart | train |
| SLQ | stopping | train |
| HGS | change | train |
| AFK | change | train |
| DVP | arrive | train |
And a "SDS" fare on route "00000"
And the shortest distance between "SOG" and "DVP" is "62.15" miles
And the following distances:
| SOG | SLQ | 17.88 |
| SLQ | HGS | 0.73 |
| HGS | AFK | 26.34 |
| AFK | DVP | 21.22 |
And there is a "CDS" from "SOG" to "DVP" on route "00000" for "1130"
And there is a "CDS" from "SLQ" to "DVP" on route "00000" for "990"
And "SOG" has the routeing points "TON,G15"
And "DVP" has the routeing points "DVP"
And the group "G15" contains "SLQ,HGS"
And "G15" to "DVP" has a permitted route "KA" with:
| KA | G15 | AFK |
| MS | AFK | DVP |
Then the journey should be "valid" because "journey passed long distance rules"
# Winchester to Brighton via Basingstoke and Clapham Junction
Scenario: Journey is not within 3 miles of the shortest distance and has a fare for 00700 but not for 00000
Given a journey:
| WIN | depart | train |
| BSK | change | train |
| FNB | passing | train |
| WOK | calling | train |
| BFN | passing | train |
| WYB | passing | train |
| SUR | passing | train |
| NEM | passing | train |
| RAY | passing | train |
| WIM | passing | train |
| CLJ | change | train |
| BAL | passing | train |
| SRC | passing | train |
| NRB | passing | train |
| TTH | passing | train |
| SRS | passing | train |
| ECR | passing | train |
| SCY | passing | train |
| ELD | passing | train |
| HOR | calling | train |
| GTW | passing | train |
| TBD | passing | train |
| HHE | passing | train |
| WVF | passing | train |
| HSK | passing | train |
| BTN | arrive | train |
And a "SDS" fare on route "00700"
And the shortest distance between "WIN" and "BTN" is "65.29" miles
And the following distances:
| WIN | BSK | 18.82 |
| BSK | FNB | 14.59 |
| FNB | WOK | 8.87 |
| WOK | BFN | 3.94 |
| BFN | WYB | 1.25 |
| WYB | SUR | 7.12 |
| SUR | NEM | 2.27 |
| NEM | RAY | 1.14 |
| RAY | WIM | 1.41 |
| WIM | CLJ | 3.32 |
| CLJ | BAL | 1.95 |
| BAL | SRC | 1.95 |
| SRC | NRB | 0.86 |
| NRB | TTH | 1.21 |
| TTH | SRS | 0.73 |
| SRS | ECR | 1.15 |
| ECR | SCY | 0.90 |
| SCY | ELD | 10.33 |
| ELD | HOR | 4.11 |
| HOR | GTW | 0.85 |
| GTW | TBD | 2.69 |
| TBD | HHE | 8.48 |
| HHE | WVF | 11.39 |
| WVF | HSK | 2.90 |
| HSK | BTN | 7.08 |
And there is a "CDS" from "WIN" to "BTN" on route "00000" for "2550"
And there is a "CDS" from "BSK" to "BTN" on route "00000" for "2130"
And there is a "CDS" from "WIN" to "BTN" on route "00700" for "1460"
And there is a "CDS" from "BSK" to "BTN" on route "00700" for "1680"
And "WIN" has the routeing points "BSK,ESL"
And the group "G04" contains "BTN"
And the group "G82" contains "BFN,WYB"
And the group "G29" contains "NRB,SRC,SRH,SRS,STE,TTH"
And the group "G08" contains "ECR,SCY,WCY"
And the group "G60" contains "ELD,RDH"
And "BSK" to "G04" has a permitted route "LE,LB" with:
| LE | BSK | FNB |
| LE | FNB | WOK |
| LE | WOK | G82 |
| LE | G82 | SUR |
| LE | SUR | NEM |
| LE | NEM | RAY |
| LE | RAY | WIM |
| LE | WIM | CLJ |
| LB | CLJ | BAL |
| LB | BAL | G29 |
| LB | G29 | G08 |
| LB | G08 | G60 |
| LB | G60 | GTW |
| LB | GTW | TBD |
| LB | TBD | HHE |
| LB | HHE | WVF |
| LB | WVF | HSK |
| LB | HSK | G04 |
Then the journey should be "invalid" because "failed nfm64"