Loading t/30-iris-const.t +16 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ use warnings; use 5.014; use DateTime; use Test::More tests => 4; use Test::More tests => 5; use Test::Fatal; use Travel::Status::DE::IRIS; Loading Loading @@ -39,6 +39,21 @@ $status = Travel::Status::DE::IRIS->new( ok( defined $status->errstr, 'constructor with missing data has errstr' ); $status = Travel::Status::DE::IRIS->new( iris_base => 'file:t/in', station => 'doesnotexist', datetime => DateTime->new( year => 2014, month => 1, day => 3, hour => 19, minute => 1, time_zone => 'Europe/Berlin' ) ); ok( defined $status->errstr, 'constructor with imaginary station has errstr' ); $status = Travel::Status::DE::IRIS->new( iris_base => 'file:t/in', station => 'EBILP', Loading t/31-result-basics.t +18 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ use 5.014; use utf8; use DateTime; use Test::More tests => 434; use Test::More tests => 435; use Test::Fatal; use Travel::Status::DE::IRIS; Loading Loading @@ -70,3 +70,20 @@ for my $i (0 .. $#results) { is($r->destination, $r->route_end, "results[$i]: destination == routd_end"); is($r->train, $r->line, "results[$i]: line == train"); } $status = Travel::Status::DE::IRIS->new( iris_base => 'file:t/in', station => 'EE', datetime => DateTime->new( year => 2014, month => 1, day => 5, hour => 20, minute => 1, time_zone => 'Europe/Berlin' ) ); @results = $status->results; is(@results, 0, 'no data available -> empty result list'); Loading
t/30-iris-const.t +16 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ use warnings; use 5.014; use DateTime; use Test::More tests => 4; use Test::More tests => 5; use Test::Fatal; use Travel::Status::DE::IRIS; Loading Loading @@ -39,6 +39,21 @@ $status = Travel::Status::DE::IRIS->new( ok( defined $status->errstr, 'constructor with missing data has errstr' ); $status = Travel::Status::DE::IRIS->new( iris_base => 'file:t/in', station => 'doesnotexist', datetime => DateTime->new( year => 2014, month => 1, day => 3, hour => 19, minute => 1, time_zone => 'Europe/Berlin' ) ); ok( defined $status->errstr, 'constructor with imaginary station has errstr' ); $status = Travel::Status::DE::IRIS->new( iris_base => 'file:t/in', station => 'EBILP', Loading
t/31-result-basics.t +18 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ use 5.014; use utf8; use DateTime; use Test::More tests => 434; use Test::More tests => 435; use Test::Fatal; use Travel::Status::DE::IRIS; Loading Loading @@ -70,3 +70,20 @@ for my $i (0 .. $#results) { is($r->destination, $r->route_end, "results[$i]: destination == routd_end"); is($r->train, $r->line, "results[$i]: line == train"); } $status = Travel::Status::DE::IRIS->new( iris_base => 'file:t/in', station => 'EE', datetime => DateTime->new( year => 2014, month => 1, day => 5, hour => 20, minute => 1, time_zone => 'Europe/Berlin' ) ); @results = $status->results; is(@results, 0, 'no data available -> empty result list');