1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!perl
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
use strict;
use warnings;
use Audio::MPD::Common::Stats;
use Test::More tests => 8;
my %kv = (
artists => 3,
albums => 2,
songs => 4,
uptime => 10002,
playtime => 5,
db_playtime => 8,
db_update => 1175631570,
);
my $s = Audio::MPD::Common::Stats->new( \%kv );
isa_ok( $s, 'Audio::MPD::Common::Stats', 'object creation' );
is( $s->artists, 3, 'accessor: artists' );
is( $s->albums, 2, 'accessor: albums' );
is( $s->songs, 4, 'accessor: songs' );
is( $s->uptime, 10002, 'accessor: uptime' );
is( $s->playtime, 5, 'accessor: playtime' );
is( $s->db_playtime, 8, 'accessor: db_playtime' );
is( $s->db_update, 1175631570, 'accessor: db_update' );
|