summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/20-vrr.t17
-rw-r--r--t/21-vrr.t12
2 files changed, 15 insertions, 14 deletions
diff --git a/t/20-vrr.t b/t/20-vrr.t
index edd7f0b..54d5ad1 100644
--- a/t/20-vrr.t
+++ b/t/20-vrr.t
@@ -13,6 +13,7 @@ require_ok('Travel::Routing::DE::VRR');
sub efa_conf {
my $ret = {
+ efa_url => 'http://efa.vrr.de/vrr/XSLT_TRIP_REQUEST2',
origin => ['Essen', 'HBf'],
destination => ['Koeln', 'HBf'],
lwp_options => {},
@@ -178,40 +179,40 @@ is_efa_post(
is_efa_err(
'departure_time', '37:00',
- 'Travel::Routing::DE::VRR::Exception::Setup',
+ 'Travel::Routing::DE::EFA::Exception::Setup',
);
is_efa_err(
'departure_time', '07',
- 'Travel::Routing::DE::VRR::Exception::Setup',
+ 'Travel::Routing::DE::EFA::Exception::Setup',
);
is_efa_err(
'train_type', 'invalid',
- 'Travel::Routing::DE::VRR::Exception::Setup',
+ 'Travel::Routing::DE::EFA::Exception::Setup',
);
is_efa_err(
'walk_speed', 'invalid',
- 'Travel::Routing::DE::VRR::Exception::Setup',
+ 'Travel::Routing::DE::EFA::Exception::Setup',
);
is_efa_err(
'select_interchange_by', 'invalid',
- 'Travel::Routing::DE::VRR::Exception::Setup',
+ 'Travel::Routing::DE::EFA::Exception::Setup',
);
is_efa_err(
'exclude', [qw[sonstige invalid]],
- 'Travel::Routing::DE::VRR::Exception::Setup',
+ 'Travel::Routing::DE::EFA::Exception::Setup',
);
is_efa_err(
'date', '42.5.2003',
- 'Travel::Routing::DE::VRR::Exception::Setup',
+ 'Travel::Routing::DE::EFA::Exception::Setup',
);
is_efa_err(
'date', '7.',
- 'Travel::Routing::DE::VRR::Exception::Setup',
+ 'Travel::Routing::DE::EFA::Exception::Setup',
);
diff --git a/t/21-vrr.t b/t/21-vrr.t
index 139790e..1478cf2 100644
--- a/t/21-vrr.t
+++ b/t/21-vrr.t
@@ -10,24 +10,24 @@ use File::Slurp qw(slurp);
use Test::More tests => 74;
BEGIN {
- use_ok('Travel::Routing::DE::VRR');
+ use_ok('Travel::Routing::DE::EFA');
}
-require_ok('Travel::Routing::DE::VRR');
+require_ok('Travel::Routing::DE::EFA');
my $xml = slurp('t/in/e_alf_d_hbf.xml');
-my $routing = Travel::Routing::DE::VRR->new_from_xml( xml => $xml );
+my $routing = Travel::Routing::DE::EFA->new_from_xml( xml => $xml );
-isa_ok( $routing, 'Travel::Routing::DE::VRR' );
+isa_ok( $routing, 'Travel::Routing::DE::EFA' );
can_ok( $routing, 'routes' );
for my $r ( $routing->routes ) {
- isa_ok( $r, 'Travel::Routing::DE::VRR::Route' );
+ isa_ok( $r, 'Travel::Routing::DE::EFA::Route' );
can_ok( $r,
qw(duration parts ticket_type fare_adult fare_child vehicle_time) );
for my $c ( $r->parts ) {
- isa_ok( $c, 'Travel::Routing::DE::VRR::Route::Part' );
+ isa_ok( $c, 'Travel::Routing::DE::EFA::Route::Part' );
can_ok(
$c, qw(
arrival_stop arrival_platform arrival_stop_and_platform