1#!/usr/local/bin/perl -w 2 3 4 5use strict; 6use Test::More tests => 17; 7 8use_ok( 'Games::Bingo::Card' ); 9 10my $card = Games::Bingo::Card->new(); 11my $fcc = $card->_init(); 12 13#test 1 14is(scalar @{$fcc}, 9, 'Number of Columns'); 15 16#test 2-6 17my $t = 9; 18 19for (1..9) { 20 my $c = $fcc->get_column(--$t); 21 isa_ok($c, 'Games::Bingo::Column', 'Testing column'); 22} 23 24#test 7 25is($t, 0, 'Testing the number of numbers generated'); 26 27my $c1 = Games::Bingo::Column->new(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); 28my $c2 = Games::Bingo::Column->new(1, 11, 12, 13, 14, 15, 16, 17, 18, 19); 29my $c3 = Games::Bingo::Column->new(2, 21, 22, 23, 24, 25, 26, 27, 28, 29); 30 31my $col = Games::Bingo::ColumnCollection->new($c1, $c2, $c3); 32 33is($col->get_column(), undef); 34 35is($col->get_column(-1), undef); 36 37ok($col->get_column(1)); 38 39is($col->get_column(4), undef); 40 41ok($col->get_column(1)); 42