[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Fri Apr 4 13:51:50 UTC 2008


kawas
Fri Apr  4 09:51:49 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/t
In directory dev.open-bio.org:/tmp/cvs-serv25759/Perl/MOBY-Server/t

Modified Files:
	Client-Central.t 
Log Message:
added a test for service type registration that checks for empty ISA relationships. Previously, servicetypes with relationship type "" were registered into the registry.
moby-live/Perl/MOBY-Server/t Client-Central.t,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t	2008/02/21 00:21:28	1.1
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t	2008/04/04 13:51:49	1.2
@@ -71,6 +71,7 @@
   $r = $C->deregisterObjectClass( objectType => "Rubbish" );
   $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' );
   $r = $C->deregisterServiceType( serviceType => 'RubbishyService' );
+  $r = $C->deregisterServiceType( serviceType => 'RubbishyServiceNoParent' );
 };
 
 # Can we connect to the registry?
@@ -179,7 +180,18 @@
   or diag("Name space registration failure: " . $r->message) ;
 
 ############     SERVICE-TYPE REGISTRATION        #############
-my %ServiceType = ( serviceType   => "RubbishyService",
+#this registration should fail => empty relationship type
+my %ServiceType = ( serviceType   => "RubbishyServiceNoParent",
+		    description   => "a human-readable description of the service",
+		    contactEmail  => 'your at email.address',
+		    authURI       => "test.suite.com",
+		    Relationships => { ISA => [''] }
+		  );
+$r = $C->registerServiceType( %ServiceType );
+ok($r->success == 0, "\nService Type registration unsuccessful when no parent specified!")
+  or diag("\nService Type registration was successful when no parent type was specified:\n" . $r->message) ;
+
+%ServiceType = ( serviceType   => "RubbishyService",
 		    description   => "a human-readable description of the service",
 		    contactEmail  => 'your at email.address',
 		    authURI       => "test.suite.com",
@@ -189,7 +201,6 @@
 ok($r->success, "Service Type registration successful")
   or diag("Service Type registration failure: " . $r->message) ;
 
-
 $r = $C->Relationships(objectType => $Obj{objectType});
 isa_ok($r, "HASH", "Relationship types hash") 
   or diag("Object Relationships didn't return a hashref for object types") ;




More information about the MOBY-guts mailing list