[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jul 29 16:35:22 UTC 2005


mwilkinson
Fri Jul 29 12:35:22 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv10118/t

Modified Files:
	Client-Central.t 
Log Message:
more tests

moby-live/Perl/t Client-Central.t,1.20,1.21
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/07/29 16:12:02	1.20
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/07/29 16:35:22	1.21
@@ -397,8 +397,33 @@
 $r = $C->retrieveNamespaces();
 isa_ok($r, "HASH", "Namespace hash") or diag("retrieveNamespaces didn't return a hashref") ;
 %ns = %{$r};
-is($ns{RubbishNamespace}, "human readable description of the namespace") or diag("namespace definition not returned correctly");
+is($ns{RubbishNamespace}, "human readable description of namespace") or diag("namespace definition not returned correctly");
 
+$r = $C->retrieveServiceTypes();
+isa_ok($r, "HASH", "Service types hash") or diag("retrieveServiceTypes didn't return a hashref") ;
+%st = %{$r};
+is($st{RubbishyService}, "a human-readable description of the service") or diag("service type definition not returned correctly");
+
+
+$r = $C->retrieveObjectNames();
+isa_ok($r, "HASH", "Object types hash") or diag("retrieveObjectNames didn't return a hashref") ;
+%on = %{$r};
+is($on{Rubbish}, "a human-readable description of the object") or diag("object name definition not returned correctly");
+
+
+$r = $C->Relationships(objectType => "Rubbish");
+isa_ok($r, "HASH", "Relationship types hash") or diag("Relationships didn't return a hashref for object types") ;
+%rel= %{$r};
+print STDERR "\n\n\nkeys ",(keys %rel),"\n\n\n";
+isa_ok($rel{'urn:lsid:biomoby.org:objectrelation:isa'}, "ARRAY") or diag("Relationships didn't return a hash of arrayrefs");
+is(shift(@{$rel{'urn:lsid:biomoby.org:objectrelation:isa'}}), "urn:lsid:biomoby.org:objectclass:Object") or diag("Relationships arrayref didn't return the right parentage.");
+
+$r = $C->Relationships(serviceType => "RubbishyService");
+isa_ok($r, "HASH", "Relationship types hash") or diag("Relationships didn't return a hashref for service types") ;
+%rel= %{$r};
+print STDERR "\n\n\nkeys ",(keys %rel),"\n\n\n";
+isa_ok($rel{'urn:lsid:biomoby.org:servicerelation:isa'}, "ARRAY") or diag("Relationships didn't return a hash of arrayrefs for servies");
+is(shift(@{$rel{'urn:lsid:biomoby.org:servicerelation:isa'}}), "urn:lsid:biomoby.org:servicetype:Retrieval") or diag("Relationships arrayref didn't return the right parentage for service types.");
 
 
 $r = $C->deregisterObjectClass(objectType => "Rubbish");
@@ -407,7 +432,7 @@
 
 
 
-# Test 13
+# Test 13 is a retrieval
 $r = $C->deregisterServiceType(serviceType => "RubbishyService");
 ( ok($r->success,"Service Type deregistration successful")
 ) or diag("Service Type deregistration failure: ".$r->message) ;




More information about the MOBY-guts mailing list