3 # This file is part of Audio::MPD.
4 # Copyright (c) 2007 Jerome Quelin <jquelin@cpan.org>
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or (at
9 # your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 use Audio::MPD::Status;
26 use Test::More tests => 14;
41 audio => '44100:16:2',
42 error => 'problems opening audio device',
45 my $s = Audio::MPD::Status->new( %kv );
46 isa_ok( $s, 'Audio::MPD::Status', 'object creation' );
47 is( $s->volume, 66, 'accessor: volume' );
48 is( $s->repeat, 1, 'accessor: repeat' );
49 is( $s->random, 0, 'accessor: random' );
50 is( $s->playlist, 24, 'accessor: playlist' );
51 is( $s->playlistlength, 21, 'accessor: playlistlength' );
52 is( $s->xfade, 14, 'accessor: xfade' );
53 is( $s->state, 'play', 'accessor: state' );
54 is( $s->song, 10, 'accessor: song' );
55 is( $s->songid, 11, 'accessor: songid' );
56 isa_ok( $s->time, 'Audio::MPD::Time', 'accessor: time' );
57 is( $s->bitrate, 127, 'accessor: bitrate' );
58 is( $s->audio, '44100:16:2', 'accessor: audio' );
59 is( $s->error, 'problems opening audio device', 'accessor: error' );