maint: list Data::Stag::XMLWriter as dropped dependency
[bioperl-live.git] / t / SeqIO / chadoxml.t
blobcaed6c1543b2e06c8d8425c52390a838fa2786ac
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7     use Bio::Root::Test;
8     
9     test_begin(-tests               => 8,
10                            -requires_module     => 'XML::Writer',
11                            -requires_networking => 0,
12                           );
13         
14         use_ok('Bio::SeqIO::chadoxml');
17 my $verbose = test_debug();
19 TODO: {
20         my $format = 'chadoxml';
21         todo_skip "No tests for $format format -- no sample file to test against", 7, if 1;
23         my $seqio_obj = Bio::SeqIO->new(-file   => test_input_file("test.$format"),
24                                                                 -format => $format);
25         
26         isa_ok($seqio_obj, 'Bio::SeqIO');
27         
28         my @methods = qw(next_seq write_seq);
29         foreach my $method (@methods) {
30                 can_ok($seqio_obj, $method) || 
31                         diag "$method method not implemented for $format";      
32         }
33         
34         # checking the first sequence object
35         my $seq_obj = $seqio_obj->next_seq();
36         isa_ok($seq_obj, 'Bio::Seq');
37         my %expected = ('seq'         => '' .
38                                         'length'      => '',
39                                         'primary_id'  => '',
40                                         'description' => qr(),
41                                    );
42         is   ($seq_obj->seq(),         $expected{'seq'},         'sequence');
43         is   ($seq_obj->length(),      $expected{'length'},      'length');
44         is   ($seq_obj->primary_id(),  $expected{'primary_id'},  'primary_id');
45         like ($seq_obj->description(), $expected{'description'}, 'description');