[MOBY-guts] biomoby commit

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


mwilkinson
Fri Jul 29 10:38:15 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv8938/t

Modified Files:
	Client-Central.t 
Log Message:
adding new tests for the less used mobycentral functions

moby-live/Perl/t Client-Central.t,1.14,1.15
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/07/28 21:40:31	1.14
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/07/29 14:38:15	1.15
@@ -30,7 +30,7 @@
 ################## MOBY Registration Tests #################
 
 # Test 3
-$r = $C->registerObjectClass(objectType => "TotalCrap",
+$r = $C->registerObjectClass(objectType => "Rubbish",
                 description => "a human-readable description of the object",
 				contactEmail => 'your at email.address',
                 authURI => "test.suite.com",
@@ -48,7 +48,7 @@
 
 
 # Test 4
-$r = $C->registerObjectClass(objectType => "TotalCrap",
+$r = $C->registerObjectClass(objectType => "Rubbish",
                 description => "a human-readable description of the object",
 				contactEmail => 'your at email.address',
                 authURI => "test.suite.com",
@@ -66,7 +66,7 @@
 
 
 # Test 5
-$r = $C->deregisterObjectClass(objectType => "TotalCrap");
+$r = $C->deregisterObjectClass(objectType => "Rubbish");
 ( ok($r->success,"Object deregistration successful"))
 or diag("Object deregistration failure: ".$r->message) ;
 
@@ -74,7 +74,7 @@
 
 
 # Test 6 (identical to #4
-$r = $C->registerObjectClass(objectType => "TotalCrap",
+$r = $C->registerObjectClass(objectType => "Rubbish",
                 description => "a human-readable description of the object",
 				contactEmail => 'your at email.address',
                 authURI => "test.suite.com",
@@ -93,7 +93,7 @@
 
 # Test 7
 $r = $C->registerNamespace(
-    namespaceType =>'UglyNamespace',
+    namespaceType =>'RubbishNamespace',
     authURI => 'your.authority.URI',
     description => "human readable description of namespace",
     contactEmail => 'your at address.here');
@@ -104,7 +104,7 @@
 
 
 # Test 8
-$r = $C->registerServiceType(serviceType => "CrappyService",
+$r = $C->registerServiceType(serviceType => "RubbishyService",
                 description => "a human-readable description of the service",
 				contactEmail => 'your at email.address',
                 authURI => "test.suite.com",
@@ -127,10 +127,10 @@
     category  =>  "moby",
     URL    =>  "http://illuminae/cgi-bin/service.pl",
 	input =>[
-        ['articleName1', [Object => ['UglyNamespace']]], # Simple
+        ['articleName1', [Object => ['RubbishNamespace']]], # Simple
 	        ],
 	output =>[
-        ['articleName2', [String => ['UglyNamespace']]], # Simple
+        ['articleName2', [String => ['RubbishNamespace']]], # Simple
 	         ],
 	secondary => {
         parametername1 => {
@@ -155,10 +155,10 @@
     category  =>  "moby",
     URL    =>  "http://illuminae/cgi-bin/service.pl",
 	input =>[
-        ['articleName1', [Object => ['UglyNamespace']]], # Simple
+        ['articleName1', [Object => ['RubbishNamespace']]], # Simple
 	        ],
 	output =>[
-        ['articleName2', [String => ['UglyNamespace']]], # Simple
+        ['articleName2', [String => ['RubbishNamespace']]], # Simple
 	         ],
 	secondary => {
         parametername1 => {
@@ -214,7 +214,7 @@
 @ns = @{$in->namespaces};
 is(scalar(@ns),1) or diag("simple input reporting wrong number of namespaces");
 $ns = shift @ns;
-is($ns, 'UglyNamespace') or diag("simple input reporting wrong namespace");
+is($ns, 'RubbishNamespace') or diag("simple input reporting wrong namespace");
 
 is($out->objectType, "String") or diag("simple output type reported incorrectly");
 is($out->articleName, "articleName2") or diag("simple output article name reported incorrectly");
@@ -222,7 +222,7 @@
 @ns = @{$out->namespaces};
 is(scalar(@ns),1) or diag("simple output reporting wrong number of namespaces");
 $ns = shift @ns;
-is($ns, 'UglyNamespace') or diag("simple output reporting wrong namespace");
+is($ns, 'RubbishNamespace') or diag("simple output reporting wrong namespace");
 
 is($sec->articleName, 'parametername1') or diag("secondary article reporting wrong article name");
 is($sec->datatype, 'Integer') or diag("secondary article reporting wrong datatype");
@@ -248,10 +248,10 @@
     category  =>  "moby",
     URL    =>  "http://illuminae/cgi-bin/service.pl",
 	input =>[
-        ['articleName1', [[Object => ['UglyNamespace']]]], # Simple
+        ['articleName1', [[Object => ['RubbishNamespace']]]], # Simple
 	        ],
 	output =>[
-        ['articleName2', [[String => ['UglyNamespace']]]], # Simple
+        ['articleName2', [[String => ['RubbishNamespace']]]], # Simple
 	         ],
 	secondary => {
         parametername1 => {
@@ -325,14 +325,14 @@
 @ns = @{$in->namespaces};
 is(scalar(@ns),1) or diag("simple input reporting wrong number of namespaces (collections test)");
 $ns = shift @ns;
-is($ns, 'UglyNamespace') or diag("simple input reporting wrong namespace (collections test)");
+is($ns, 'RubbishNamespace') or diag("simple input reporting wrong namespace (collections test)");
 
 is($out->objectType, "String") or diag("simple output type reported incorrectly (collections test)");
 isa_ok($out->namespaces, 'ARRAY') or diag("simple output namespaces not returned as an arrayref (collections test)");
 @ns = @{$out->namespaces};
 is(scalar(@ns),1) or diag("simple output reporting wrong number of namespaces (collections test)");
 $ns = shift @ns;
-is($ns, 'UglyNamespace') or diag("simple output reporting wrong namespace (collections test)");
+is($ns, 'RubbishNamespace') or diag("simple output reporting wrong namespace (collections test)");
 
 
 $r = $C->deregisterService(
@@ -359,15 +359,22 @@
 
 
 
-# Test 12
-$r = $C->deregisterObjectClass(objectType => "TotalCrap");
+# TESTS FOR ONTOLOGY TRAVERSAL AND SO ON
+
+$r = $C->retrieveObjectDefinition(objectType => "Rubbish");
+isa_ok($r , "HASH", "Object definition returns hashref") or diag("Object definition did not return as a hashref") ;
+
+
+
+
+$r = $C->deregisterObjectClass(objectType => "Rubbish");
 ( ok($r->success,"Object deregistration successful")
 ) or diag("Object deregistration failure: ".$r->message) ;
 
 
 
 # Test 13
-$r = $C->deregisterServiceType(serviceType => "CrappyService");
+$r = $C->deregisterServiceType(serviceType => "RubbishyService");
 ( ok($r->success,"Service Type deregistration successful")
 ) or diag("Service Type deregistration failure: ".$r->message) ;
 
@@ -375,7 +382,7 @@
 
 
 # Test 44
-$r = $C->deregisterNamespace(namespaceType =>'UglyNamespace');
+$r = $C->deregisterNamespace(namespaceType =>'RubbishNamespace');
 ( ok($r->success,"namespace  deregistration successful")
 ) or diag("namespace deregistration failure: ".$r->message) ;
 




More information about the MOBY-guts mailing list