[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jul 8 19:22:21 UTC 2005


mwilkinson
Fri Jul  8 15:22:21 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv25078/t

Modified Files:
	Client-Central.t 
Log Message:
added a test for Eddie's changes to the test harness

moby-live/Perl/t Client-Central.t,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/07/04 17:52:18	1.7
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/07/08 19:22:21	1.8
@@ -5,7 +5,7 @@
 
 # change 'tests => 1' to 'tests => last_test_to_print';
 
-use Test::More tests => 13; # perldoc Test::More for details
+use Test::More tests => 14; # perldoc Test::More for details
 
 # Test 1
 BEGIN { use_ok('MOBY::Client::Central') };
@@ -96,7 +96,33 @@
 ( ok($r->success,"Service Type registration successful")
 ) or diag("Service Type registration failure: ".$r->message) ;
 
-# Test 8
+# Test 8  # should fail
+$r = $C->registerService(
+    serviceName  => "myfirstservice",  
+    serviceType  => "Retrieval",  
+    authURI      => "test.suite.com",      
+    contactEmail => 'your at mail.address',      
+    description => "this is my first service", 
+    category  =>  "moby",
+    URL    =>  "http://illuminae/cgi-bin/service.pl",
+	input =>[
+        ['articleName1', [Object => ['UglyNamespace']]], # Simple
+	        ],
+	output =>[
+        ['articleName2', [String => ['UglyNamespace']]], # Simple
+	         ],
+	secondary => {
+        parametername1 => {
+            datatype => 'INTEGER',
+    		default => 0,
+			max => 10,
+			min => -10,
+			enum => [-10, 10, 0]}});
+
+( ok(!$r->success,"Service registration correctly failed")
+) or diag("Service registration failure: ".$r->message) ;
+
+# Test 9
 $r = $C->registerService(
     serviceName  => "myfirstservice",  
     serviceType  => "Retrieval",  
@@ -123,7 +149,7 @@
 ) or diag("Service registration failure: ".$r->message) ;
 
 
-# Test 9
+# Test 10
 
 $r = $C->deregisterService(
     serviceName  => "myfirstservice",  
@@ -133,17 +159,17 @@
 ) or diag("Service deregistration failure: ".$r->message) ;
 
 
-# Test 10
+# Test 11
 $r = $C->deregisterObjectClass(objectType => "TotalCrap");
 ( ok($r->success,"Object deregistration successful")
 ) or diag("Object deregistration failure: ".$r->message) ;
 
-# Test 11
+# Test 12
 $r = $C->deregisterServiceType(serviceType => "CrappyService");
 ( ok($r->success,"Service Type deregistration successful")
 ) or diag("Service Type deregistration failure: ".$r->message) ;
 
-# Test 12
+# Test 13
 $r = $C->deregisterNamespace(namespaceType =>'UglyNamespace');
 ( ok($r->success,"namespace  deregistration successful")
 ) or diag("namespace deregistration failure: ".$r->message) ;
@@ -152,7 +178,7 @@
 #
 #my @service ;
 #
-## Tests 7,8: locateServiceByOutput with output 'Object' and full_objects + full_services
+## Tests 14,15: locateServiceByOutput with output 'Object' and full_objects + full_services
 #@service = $C->locateServiceByOutput(
 #    objectType => "Object",
 #    fullObjects => 1,
@@ -166,7 +192,7 @@
 #    is($service[0]->name,"Servicetest2","locateServiceByOutput service name") ;
 #} ; 
 #
-## Tests 9,10: Testing locateServiceByOutput with output "Object" and full_services only
+## Tests 16,17: Testing locateServiceByOutput with output "Object" and full_services only
 #@service = $C->locateServiceByOutput(
 #    objectType => "Object",
 #    fullObjects => 0,
@@ -179,7 +205,7 @@
 #    is($service[0]->name,"Servicetest2","locateServiceByOutput service name") ;
 #} ; 
 #
-## Tests 11,12: Testing locateServiceByInput with input
+## Tests 18,19: Testing locateServiceByInput with input
 ## 'Object' => Genbank/GI and full_objects + full_services
 #@service = $C->locateServiceByInput(
 #    input => {"Sequence" => ["Genbank/GI"]},
@@ -194,7 +220,7 @@
 #    is($service[0]->name,"Servicetest2","locateServiceByOutput service name") ;
 #} ; 
 #
-## Tests 13,14: Testing locateServiceByInput with input
+## Tests 20,21: Testing locateServiceByInput with input
 ## 'Object' => Genbank/GI and full_services only
 #@service = $C->locateServiceByInput(
 #    input => {"Object" => ["Genbank/GI"]},
@@ -209,7 +235,7 @@
 #    is($service[0]->name,"Servicetest2","locateServiceByOutput service name") ;
 #} ; 
 #
-## Tests 15,16: Testing locateServiceByType with type 'Retrieve' + full_services
+## Tests 22,23: Testing locateServiceByType with type 'Retrieve' + full_services
 #@service = $C->locateServiceByType(
 #    serviceType => "Retrieve",
 #    fullServices => 1,




More information about the MOBY-guts mailing list