tag fourth (and hopefully last) alpha
[bioperl-live.git] / branch-1-6 / t / SeqIO / bsml_sax.t
blob2b4d800af1fdc4e24cc7687ad690a09edec38cb6
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 => 15,
11                            -requires_modules => [qw(XML::SAX
12                                                                             XML::SAX::Writer
13                                                                                 XML::SAX::Base)]);
14     
15         use_ok('Bio::SeqIO');
18 my $verbose = test_debug();
20 my $str = Bio::SeqIO->new(-format => 'bsml_sax',
21                           -verbose => $verbose,
22                           -file => test_input_file('U83300.bsml'));
23 my $seq = $str->next_seq;
24 isa_ok($seq, 'Bio::Seq::RichSeqI');
25 my @refs = $seq->annotation->get_Annotations('reference');
26 is(@refs, 2);
27 is($seq->display_id,'MIVN83300');
28 is($seq->molecule ,'dna');
29 ok(! $seq->is_circular);
30 is($seq->get_dates,2);
31 is($seq->accession_number, 'U83300');
32 is($seq->seq_version,1);
33 my @feats = $seq->get_SeqFeatures;
34 is(@feats, 2);
35 is($feats[1]->start, 1);
36 is($feats[1]->end, 946);
37 is($feats[1]->get_tag_values('db_xref'), 3);
38 is($seq->annotation->get_Annotations('reference'),2);
39 is($seq->annotation->get_Annotations('dblink'),2);