LIMS-MT_Plate

 view release on metacpan or  search on metacpan

t/LIMS-MT_Plate.t  view on Meta::CPAN

#! /usr/bin/perl -w

use strict;

use Test::Harness;
use Test::More tests=>13;
use Test::Group;
use Test::Differences;
use Test::Deep;
use Test::Exception;

# 1,2
BEGIN {
	use_ok('LIMS::MT_Plate');
	use_ok('LIMS::MT_Plate_File');
	$SIG{__WARN__} = \&trap_warn;
}


my $oTube = tube->new('tube');
my $oPlate_96_1 = mt_96->new('96well_1');
my $oPlate_96_2 = mt_plate->new('96well_2',96);
my $oPlate_96_3 = mt_96->new('96well_3',96);
my $oPlate_96_4 = mt_96->new('96well_4',96);
my $oPlate_96_5 = mt_96->new('96well_5',96);
my $oPlate_96_6 = mt_96->new('96well_6',96);
my $oPlate_96_7 = mt_96->new('96well_7',96);
my $oPlate_384 = mt_384->new('384well');
my $oPlate_1536 = mt_1536->new('1536well');

# 3
test "objects" => sub {
	isa_ok($oTube,'tube','tube object');
	isa_ok($oPlate_96_1,'mt_96','mt_96 object');
	isa_ok($oPlate_384,'mt_384','mt_384 object');
	isa_ok($oPlate_1536,'mt_1536','mt_1536 object');
	isa_ok($oPlate_96_2,'mt_96','mt_plate object');
	isa_ok($oPlate_96_3,'mt_96','mt_96 object');
	isa_ok($oPlate_96_4,'mt_96','mt_96 object');
	isa_ok($oPlate_96_5,'mt_96','mt_96 object');
	isa_ok($oPlate_96_6,'mt_96','mt_96 object');
	isa_ok($oPlate_96_7,'mt_96','mt_96 object');
};

# 4
test "barcodes" => sub {
	is($oPlate_96_1->barcode,'96well_1','barcode');
	is($oPlate_96_2->barcode,'96well_2','barcode');
	is($oPlate_384->barcode,'384well','barcode');
	is($oPlate_1536->barcode,'1536well','barcode');
};

# 5
test "start wells filled" => sub {
	cmp_ok($oPlate_96_1->wells_filled,'==',0,'0 wells_filled');
	cmp_ok($oPlate_96_2->wells_filled,'==',0,'0 wells_filled');
};

my @aSamples = ();
my @aSamples_b = ();
my @aSamples_c = ();
my @a8_Samples = ();
my @a12_Samples = ();

for (my $i=1; $i<=96; $i++){
	push (@aSamples,"sample $i");
	push (@aSamples_b,"sample_b $i");
	push (@aSamples_c,"sample_c $i");



( run in 2.147 seconds using v1.01-cache-2.11-cpan-97f6503c9c8 )