1 # -*-Perl-*- Test Harness script for Bioperl
8 test_begin(-tests => 14,
9 -requires_modules => [qw(IO::String LWP::UserAgent)],
10 -requires_networking => 1);
12 use_ok('Bio::Tools::Analysis::Protein::NetPhos');
13 use_ok('Bio::PrimarySeq');
14 use_ok('Bio::WebAgent');
17 my $verbose = test_debug();
19 ok my $tool = Bio::WebAgent->new(-verbose =>$verbose);
22 is $tool->delay(1), 1;
24 ok $tool->timeout(120); # LWP::UserAgent method
25 is $tool->url('http://a.b.c/'), 'http://a.b.c/';
28 my $seq = Bio::PrimarySeq->new(-id=>'bioperl',
29 -seq=>'ABCDEFGHIJKLLKJFHSAKNDJFPSINCSJNDSKNSN');
31 ok $tool = Bio::Tools::Analysis::Protein::NetPhos->new(-verbose =>$verbose);
34 ok $tool->run ( {seq=>$seq, threshold=>0.9} );
36 if ($tool->status eq 'TERMINATED_BY_ERROR') {
37 skip "Running of the tool was terminated by an error, probably network/ NetPhos server error", 3;
39 my @res = $tool->result('Bio::SeqFeatureI');
41 skip "Didn't get any results from NetPhos server, probable network/server error", 3;
43 #new tests her in v 1.2
44 ok my $raw = $tool->result('');
45 ok my $parsed = $tool->result('parsed');
46 is $parsed->[0][1], '0.934';