pod update
[audio-mpd-common.git] / t / 12-status.t
blob34c7956efd1fc2904c08dacc4ba51b8aedb53379
1 use strict;
2 use warnings;
4 use Audio::MPD::Common::Status;
5 use Test::More tests => 15;
8 my %kv = (
9     volume         => 66,
10     repeat         => 1,
11     random         => 0,
12     playlist       => 24,
13     playlistlength => 21,
14     xfade          => 14,
15     state          => 'play',
16     song           => 10,
17     songid         => 11,
18     time           => '45:214',
19     bitrate        => 127,
20     audio          => '44100:16:2',
21     error          => 'problems opening audio device',
22     updating_db    => 1,
25 my $s = Audio::MPD::Common::Status->new( \%kv );
26 isa_ok( $s,             'Audio::MPD::Common::Status',    'object creation' );
27 isa_ok( $s->time,       'Audio::MPD::Common::Time',      'accessor: time' );
28 is( $s->volume,         66,                              'accessor: volume' );
29 is( $s->repeat,         1,                               'accessor: repeat' );
30 is( $s->random,         0,                               'accessor: random' );
31 is( $s->playlist,       24,                              'accessor: playlist' );
32 is( $s->playlistlength, 21,                              'accessor: playlistlength' );
33 is( $s->xfade,          14,                              'accessor: xfade' );
34 is( $s->state,          'play',                          'accessor: state' );
35 is( $s->song,           10,                              'accessor: song' );
36 is( $s->songid,         11,                              'accessor: songid' );
37 is( $s->bitrate,        127,                             'accessor: bitrate' );
38 is( $s->audio,          '44100:16:2',                    'accessor: audio' );
39 is( $s->error,          'problems opening audio device', 'accessor: error' );
40 is( $s->updating_db,    1,                               'accessor: updating_db' );