bug 1825
[bioperl-live.git] / t / Correlate.t
blobe87638c2679a55e9baa0a394632d3305ee1fa384
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
5 BEGIN {
6     use lib 't/lib';
7         use BioperlTest;
8         
9         test_begin(-tests => 17);
10     
11     use_ok('Bio::Phenotype::Correlate');
12     use_ok('Bio::Species');
15 my $mouse = Bio::Species->new();
16   
17 $mouse->classification( qw( musculus Mus ) );
19 my $co = Bio::Phenotype::Correlate->new( -name        => "4(Tas1r3)",
20                                          -description => "mouse correlate of human phenotype MIM 605865",
21                                          -species     => $mouse,
22                                          -type        => "homolog",
23                                          -comment     => "type=homolog is putative" );
25 isa_ok($co, "Bio::Phenotype::Correlate" );
27 ok( $co->to_string() );
29 is( $co->name(), "4(Tas1r3)" );
30 is( $co->description(), "mouse correlate of human phenotype MIM 605865" );
31 is( $co->species()->binomial(), "Mus musculus" );
32 is( $co->type(), "homolog" );
33 is( $co->comment(), "type=homolog is putative" );
35 $co->init();
37 is( $co->name(), "" );
38 is( $co->description(), "" );
39 is( $co->type(), "" );
40 is( $co->comment(), "" );
42 is( $co->name( "A" ), "A" );
43 is( $co->description( "B" ), "B" );
44 is( $co->type( "C" ), "C" );
45 is( $co->comment( "D" ), "D" );