[MOBY-guts] biomoby commit

Frank Gibbons fgibbons at pub.open-bio.org
Thu Sep 1 13:50:46 UTC 2005


fgibbons
Thu Sep  1 09:50:46 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv5921/t

Modified Files:
	Client-Central.t Client-Service.t 
Log Message:
 - Make distinctions in API

moby-live/Perl/t Client-Central.t,1.40,1.41 Client-Service.t,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/08/31 22:31:55	1.40
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/09/01 13:50:46	1.41
@@ -11,7 +11,7 @@
 
 # change 'tests => 1' to 'tests => last_test_to_print';
 #use SOAP::Lite +trace;
-use Test::More 'no_plan'; #tests => 127; # perldoc Test::More for details
+use Test::More 'no_plan'; #skip_all => "Turn off for development"; # See perldoc Test::More for details
 use strict;
 use Data::Dumper;
 #Is the client-code even installed?
@@ -55,7 +55,31 @@
 isa_ok( $C, 'MOBY::Client::Central',"Connected to test MOBY Central") 
   or die("Cannot Connect to MOBY Central... cannot continue?");
 
+############           ENFORCE REGISTRY API        ###############
 
+# First, mandatory methods for all registries.
+my @mandatory = qw/findService retrieveService
+retrieveResourceURLs retrieveServiceProviders retrieveServiceNames
+retrieveServiceTypes retrieveObjectNames retrieveObjectDefinition
+retrieveNamespaces retrieveObjectSchema Relationships/;
+
+my @mandatory_if_write_access = qw/registerObjectClass deregisterObjectClass 
+registerServiceType deregisterServiceType 
+registerNamespace deregisterNamespace
+registerService deregisterService/;
+
+my @optional_recommended = qw/DUMP registerServiceWSDL/;
+
+can_ok($C, @mandatory )
+  or diag("Registry failed to supply mandatory methods");
+
+# How do we check whether the registry has 'write' access - most will, so take as default.
+can_ok($C, @mandatory_if_write_access)
+  or diag("Registry has 'write' access and failed to supply mandatory methods");
+# Optional, but probably recommended methods
+can_ok($C, @optional_recommended)
+  or diag("Registry does not supply certain optional methods;\n"
+	  . "you should consider adding them");
 ################## MOBY Registration Tests #################
 
 ##################    OBJECT REGISTRATION    #############

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/t/Client-Service.t	2005/08/30 19:14:29	1.1
+++ /home/repository/moby/moby-live/Perl/t/Client-Service.t	2005/09/01 13:50:46	1.2
@@ -40,8 +40,8 @@
 Even if we do that, we should clearly specify which is the preferred name.
 OPINION
 
-can_ok("MOBY::Client::Service", qw/new execute ServiceName/)
-  or diag($opinion);
+my @API = qw/new execute ServiceName/;
+can_ok("MOBY::Client::Service", @API) or diag($opinion);
 
 is(MOBY::Client::Service->new(), undef)
   or diag("Created a new service without supplying any WSDL - it ain't right, I tell you!"); # Can't do nothing without WSDL




More information about the MOBY-guts mailing list