Test requires networking
[bioperl-live.git] / t / Variation / AAReverseMutate.t
blob3f113804e56aa3ec953f16c5b87cb82540044c2f
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN { 
7     use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 16);
11         
12         use_ok('Bio::Variation::AAReverseMutate');
15 my $obj = Bio::Variation::AAReverseMutate->new
16     ('-aa_ori' => 'F', 
17      '-aa_mut' => 'S'
18      );
19 ok defined $obj;
20 isa_ok($obj, 'Bio::Variation::AAReverseMutate');
22 is $obj->aa_ori, 'F';
24 is $obj->aa_mut, 'S';
26 my @points = $obj->each_Variant;
27 # F>S has two solutions
28 is scalar @points, 2;
30 $obj->codon_ori('ttc');
31 ok defined $obj;
33 #now there should be only one left
34 @points = $obj->each_Variant;
35 is scalar @points, 1;
37 $obj->codon_table(3);
38 is $obj->codon_table, 3;
40 #Check the returned object
41 my $rna = pop @points;
42 isa_ok($rna, 'Bio::Variation::RNAChange');
44 is $rna->length, 1;
45 is $rna->allele_ori->seq, 't';
46 is $rna->allele_mut->seq, 'c';
48 is $rna->codon_ori, 'ttc', "Codon_ori is |". $rna->codon_ori. "|";
50 is $rna->codon_pos, 2;
52 $obj->codon_table(11);
53 is $obj->codon_table, 11;