GBPVR-CDBI

 view release on metacpan or  search on metacpan

t/recordingschedule.t  view on Meta::CPAN

#!perl -T

use Test::More;
use strict;
use warnings;

plan tests => 125;

use File::Spec;
use GBPVR::CDBI::RecordingSchedule;

my $db= File::Spec->rel2abs("t\\gbpvr.mdb");
ok($db, "found test db");
my $rc = GBPVR::CDBI->db_setup(file => $db);
ok($rc, "got db handle");

my @rows = GBPVR::CDBI::RecordingSchedule->retrieve_all();
is(scalar(@rows), 3, "got exactly 3 rows");

my @matches = (
  {
    oid => 1,
    programme_oid => undef,
    capture_source_oid => '1',
    filename => 'Battlestar Galactica',
    status => '4',
    recording_type => '5',
    recording_group => '37',
    manual_start_time => '2005-07-15 22:00:00',
    manual_end_time => '2005-07-15 23:00:00',
    manual_channel_oid => '1',
    quality_level => '2',
    pre_pad_minutes => '1',
    post_pad_minutes => '2',

    start_time => '22:00',
    end_time => '23:00',
    start_date => '2005-07-15',
    end_date => '2005-07-15',
    status_string => 'Number4',

    last_position => undef,
    archivetable => undef,
  },
  {
    oid => 2,
    programme_oid => 1,
    capture_source_oid => '1',
    filename => q/C:\Video\Battlestar Galactica\Battlestar Galactica_20060203_22002300.mpg/,
    status => '2',
    recording_type => '0',
    recording_group => '10',
    manual_start_time => '2006-02-03 22:00:00',
    manual_end_time => '2006-02-03 23:00:00',
    manual_channel_oid => '1',
    quality_level => '2',
    pre_pad_minutes => '1',
    post_pad_minutes => '2',

    start_time => '22:00',
    end_time => '23:00',
    start_date => '2006-02-03',
    end_date => '2006-02-03',
    status_string => 'Completed',

    last_position => '123.0',
    archivetable => undef,
  },
  {
    oid => 3,
    programme_oid => 2,
    capture_source_oid => '1',



( run in 1.586 second using v1.01-cache-2.11-cpan-54e63673c56 )