Move HMMER related modules, tests, and programs to new distribution.
[bioperl-live.git] / t / RemoteDB / MeSH.t
blobd9eeda12de86c59d471b1f653ff4e590e05715ca
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7     use lib '.';
8     use Bio::Root::Test;
10     test_begin(-tests => 5,
11                -requires_modules => [qw(IO::String
12                                         LWP::UserAgent
13                                         HTTP::Request::Common)],
14                -requires_networking => 1);
16     use_ok('Bio::DB::MeSH');
20 # Bio::DB::MeSH
22 ok my $mesh = Bio::DB::MeSH->new();
23 SKIP: {
24     my $t;
25     eval {$t = $mesh->get_exact_term('Dietary Fats');};
26     skip "Couldn't connect to MeSH with Bio::DB::MeSH. Skipping those tests", 3 if $@;
27     is $t->each_twig(), 3;
29     eval {$t = $mesh->get_exact_term("Sinus Thrombosis, Intracranial");};
30     skip "Couldn't connect to MeSH with Bio::DB::MeSH. Skipping those tests", 2 if $@;
31     like $t->description, qr/Thrombus/i;
32     is $t->id, "D012851";