diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-01-17 11:23:26 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-01-17 11:23:26 +0100 |
commit | 0c49e2bd3a1d51afd1be678e579451c929a42529 (patch) | |
tree | 756cc2f40604143ed400558a6409197b8cdd2764 /t/20-iris-class.t | |
parent | b19328aecd79a91ea4535edd8dddc2e4908d615f (diff) |
add basic tests
Diffstat (limited to 't/20-iris-class.t')
-rw-r--r-- | t/20-iris-class.t | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/20-iris-class.t b/t/20-iris-class.t new file mode 100644 index 0000000..0b33277 --- /dev/null +++ b/t/20-iris-class.t @@ -0,0 +1,33 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.014; + +use DateTime; +use Test::More tests => 274; + +BEGIN { + use_ok('Travel::Status::DE::IRIS'); +} +require_ok('Travel::Status::DE::IRIS'); + +my $status = Travel::Status::DE::IRIS->new( + iris_base => 'file:t/in', + station => 'EE', + datetime => DateTime->new( + year => 2014, month => 1, day => 3, hour => 20, minute => 1)); + +isa_ok($status, 'Travel::Status::DE::IRIS'); +can_ok($status, qw(errstr results)); + +for my $result ($status->results) { + isa_ok($result, 'Travel::Status::DE::IRIS::Result'); + can_ok($result, qw( + arrival classes date datetime delay departure is_cancelled line_no + platform raw_id realtime_xml route_start route_end sched_arrival + sched_departure sched_route_start sched_route_end start stop_no time + train_id train_no type unknown_t unknown_o + origin destination delay_messages qos_messages messages + info line route_pre route_post route train route_interesting + sched_route_pre sched_route_post sched_route TO_JSON)); +} |