[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jul 29 15:54:13 UTC 2005


mwilkinson
Fri Jul 29 11:54:13 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv9380/t

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

moby-live/Perl/t Client-Central.t,1.15,1.16
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/07/29 14:38:15	1.15
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/07/29 15:54:13	1.16
@@ -363,9 +363,33 @@
 
 $r = $C->retrieveObjectDefinition(objectType => "Rubbish");
 isa_ok($r , "HASH", "Object definition returns hashref") or diag("Object definition did not return as a hashref") ;
-
-
-
+is($r->objectType, "Rubbish", "Object reporting correct name") or diag("Object definition did not report correct name");
+is($r->description, "a human-readable description of the object", "Object reporting correct desc") or diag("Object definition did not report correct desc");
+is($r->contactEmail, 'your at email.address', "Object reporting correct email") or diag("Object definition did not report correct email");
+is($r->authURI, "test.suite.com", "Object reporting correct auth") or diag("Object definition did not report correct auth");
+isa_ok($r->Relationships, "HASH", "Object reporting correct Relationships hash") or diag("Object definition did not report hash on relationships");
+%rel = %{$r->Relationships};
+isa_ok($rel{ISA}, "ARRAY", "Object reporting correct ISA as arrayref") or diag("Object definition did not report ISA arrayref");
+isa_ok($rel{HASA}, "ARRAY", "Object reporting correct ISA as arrayref") or diag("Object definition did not report ISA arrayref");
+$isa = shift@{$rel{ISA}};
+$hasa = shift@{$rel{HASA}};
+isa_ok($isa, "ARRAY","") or diag("Object didn't return an array of arrays for its ISA relationships");
+isa_ok($hasa, "ARRAY","") or diag("Object didn't return an array of arrays for its HASA relationships");
+is(${$isa}[0], 'Object') or diag("ISA reporting wrong object type");
+is(${$isa}[1], 'article1') or diag("ISA reporting wrong object type");
+is(${$hasa}[0], 'Object') or diag("ISA reporting wrong object type");
+is(${$hasa}[1], 'articleName3') or diag("ISA reporting wrong object type");
+
+#objectType => "Rubbish",
+#                description => "a human-readable description of the object",
+#				contactEmail => 'your at email.address',
+#                authURI => "test.suite.com",
+#			    Relationships => {
+#					ISA => [
+#						['Object', 'article1']],
+#					HASA => [
+#						['Object', 'articleName3']]}
+#                       );
 
 $r = $C->deregisterObjectClass(objectType => "Rubbish");
 ( ok($r->success,"Object deregistration successful")




More information about the MOBY-guts mailing list