Merge pull request #185 from elucify/ncbi-https
[bioperl-live.git] / t / SeqIO / alf.t
blobd10cacae1c60e1b4ad43e0fea184f8a380e51a5d
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               => 8,
11                            -requires_module     => 'Bio::SeqIO::staden::read');
12         
13         use_ok('Bio::SeqIO::alf');
16 my $verbose = test_debug();
18 TODO: {
19         my $format = 'alf';
20         todo_skip "No tests for $format format -- no sample file to test against", 7, if 1;
22         my $seqio_obj = Bio::SeqIO->new(-file   => test_input_file("test.$format"),
23                                                                 -format => $format);
24         
25         isa_ok($seqio_obj, 'Bio::SeqIO');
26         
27         my @methods = qw(next_seq write_seq);
28         foreach my $method (@methods) {
29                 can_ok($seqio_obj, $method) || 
30                         diag "$method method not implemented for $format";      
31         }
32         
33         # checking the first sequence object
34         my $seq_obj = $seqio_obj->next_seq();
35         isa_ok($seq_obj, 'Bio::Seq::Quality');
36         my %expected = ('seq'         => '' .
37                                         'length'      => '',
38                                         'primary_id'  => '',
39                                         'description' => qr(),
40                                    );
41         is   ($seq_obj->seq(),         $expected{'seq'},         'sequence');
42         is   ($seq_obj->length(),      $expected{'length'},      'length');
43         is   ($seq_obj->primary_id(),  $expected{'primary_id'},  'primary_id');
44         like ($seq_obj->description(), $expected{'description'}, 'description');