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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
# -*-Perl-*-
## Bioperl Test Harness Script for Modules
## $ Id: Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.t'
use strict;
BEGIN {
# to handle systems with no installed Test module
# we include the t dir (where a copy of Test.pm is located)
# as a fallback
eval { require Test; };
if( $@ ) {
use lib 't';
}
use Test;
plan tests => 15;
}
use Bio::Phenotype::Correlate;
use Bio::Species;
my $mouse = Bio::Species->new();
$mouse->classification( qw( musculus Mus ) );
my $co = Bio::Phenotype::Correlate->new( -name => "4(Tas1r3)",
-description => "mouse correlate of human phenotype MIM 605865",
-species => $mouse,
-type => "homolog",
-comment => "type=homolog is putative" );
ok( $co->isa( "Bio::Phenotype::Correlate" ) );
ok( $co->to_string() );
ok( $co->name(), "4(Tas1r3)" );
ok( $co->description(), "mouse correlate of human phenotype MIM 605865" );
ok( $co->species()->binomial(), "Mus musculus" );
ok( $co->type(), "homolog" );
ok( $co->comment(), "type=homolog is putative" );
$co->init();
ok( $co->name(), "" );
ok( $co->description(), "" );
ok( $co->type(), "" );
ok( $co->comment(), "" );
ok( $co->name( "A" ), "A" );
ok( $co->description( "B" ), "B" );
ok( $co->type( "C" ), "C" );
ok( $co->comment( "D" ), "D" );
|