[MOBY-guts] biomoby commit

Frank Gibbons fgibbons at pub.open-bio.org
Fri Sep 2 14:29:30 UTC 2005


fgibbons
Fri Sep  2 10:29:30 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv10554/t

Modified Files:
	Client-Service.t 
Log Message:
 - Call autoload methods to generate code. Still fails on serviceName method.

moby-live/Perl/t Client-Service.t,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/t/Client-Service.t	2005/09/01 20:20:13	1.3
+++ /home/repository/moby/moby-live/Perl/t/Client-Service.t	2005/09/02 14:29:30	1.4
@@ -26,28 +26,23 @@
 };
 
 
-TODO: {
-  local $TODO = "Test: new, execute, name, and autoload methods.";
-
-}
-
-my $opinion = <<OPINION;
-This object can't do much, but it should do what it's supposed to.
-OPINION
-
-my @API = qw/new execute serviceName/;
-can_ok("MOBY::Client::Service", @API) or diag($opinion);
-
-is(MOBY::Client::Service->new(), undef)
+my @autoload = qw/serviceName/;
+my @API = (@autoload, qw/new execute/);
+my $service = MOBY::Client::Service->new();
+is($service, undef)
   or diag("Created a new service without supplying any WSDL - it ain't right, I tell you!"); # Can't do nothing without WSDL
 
+foreach (@autoload) { eval{$service->$_()}; } # Call all autoloads, to create them.
+can_ok("MOBY::Client::Service", @API) 
+  or diag("MOBY::Client::Service doesn't implement full API.");
+
 # Find a service at MOBY Central, try to create a local instance.
 my $C = MOBY::Client::Central->new();
 my ($s, $r) = $C->findService( authURI => 'www.illuminae.com',
 			       name => 'getDragonLocusAlleles' );
 ok($s) or diag("Couldn't retrieve service details from MOBY Central");
 my $wsdl = $C->retrieveService($$s[0]);
-my $service = MOBY::Client::Service->new (service => $wsdl);
+$service = MOBY::Client::Service->new (service => $wsdl);
 isa_ok($service, "MOBY::Client::Service")
   or diag("Expected new to return MOBY::Client::Service");
 




More information about the MOBY-guts mailing list