1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 12,
11 -requires_modules => [qw(IO::String
13 HTTP::Request::Common)],
14 -requires_networking => 1);
16 use_ok('Bio::Biblio');
22 my $verbose = test_debug();
24 $ref = $refio = undef;
27 # check BioFetch access method
28 ok ($db = Bio::Biblio->new(-access => 'biofetch',
29 -verbose => $verbose));
31 $ref = $db->get_by_id('10592273');
35 skip( "Warning: Couldn't connect to BioFetch server with Bio::DB::Biblio::biofetch! $@", 10);
38 is $ref->identifier, '10592273';
39 $ref = $refio = undef;
41 ok defined($db = Bio::Biblio->new(-access => 'biofetch',
42 -verbose => $verbose));
44 my $ids = ['10592273', '9613206'];
46 $refio = $db->get_all($ids);
50 skip("Batch access test failed. Error: $@", 7);
54 is($refio->next_bibref->identifier, '9613206');
55 is($refio->next_bibref->identifier, '10592273');
57 ok defined($db = Bio::Biblio->new(-access => 'biofetch',
58 -verbose => $verbose));
60 $refio = $db->get_Stream_by_id(['10592273', '9613206']);
64 skip("Batch access test failed. Error: $@", 3);
68 is($refio->next_bibref->identifier, '9613206');
69 is($refio->next_bibref->identifier, '10592273');