File: stats.t

package info (click to toggle)
libaudio-mpd-common-perl 1.120881-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 208 kB
  • sloc: perl: 519; makefile: 4
file content (36 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download | duplicates (6)
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
#
# This software is copyright (c) 2007 by Jerome Quelin.
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system 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' );