[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Wed Aug 3 11:30:30 UTC 2005


mwilkinson
Wed Aug  3 07:30:30 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv3820/t

Modified Files:
	Client-Central.t 
Log Message:
fixed the client and the test suite to ensure that collections are no longer able to contain multiple simples, as per API 8.86

moby-live/Perl/t Client-Central.t,1.26,1.27
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/08/02 15:18:00	1.26
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/08/03 11:30:30	1.27
@@ -4,7 +4,7 @@
 #########################
 
 # change 'tests => 1' to 'tests => last_test_to_print';
-use SOAP::Lite +trace;
+#use SOAP::Lite +trace;
 use Test::More tests => 123; # perldoc Test::More for details
 
 # Test 1
@@ -178,8 +178,38 @@
 ) or diag("Service registration failure: ".$r->message) ;
 
 
+# TEST SHOULD FAIL - testing registration of multiple Simples as part of Collection
+$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 =>[
+        	['articleNameMultiSimples', [
+			[Object => ['RubbishNamespace'],
+			String => ['RubbishNamespace'],
+			]
+				]
+		], # Simple
+	        ],
+	output =>[
+        ['articleNameSimpleSingle', [String => ['RubbishNamespace']]], # Simple
+	         ],
+	secondary => {
+        parametername1 => {
+            datatype => 'Integer',
+    		default => 0,
+			max => 10,
+			min => -10,
+			enum => [-10, 10, 0]}});
+
+( ok(!$r->success,"Service registration of two simples in a collection successfully failed")
+) or diag("Service registration should have failed when registering two Simples in a collection: ".$r->message) ;
 
-# Test 10
+# TEST SHOULD PASS - correct service registration
 $r = $C->registerService(
     serviceName  => "myfirstservice",  
     serviceType  => "Retrieval",  
@@ -282,10 +312,10 @@
     category  =>  "moby",
     URL    =>  "http://illuminae/cgi-bin/service.pl",
 	input =>[
-        ['articleName1', [[Object => ['RubbishNamespace']]]], # Simple
+        ['articleName1', [[Object => ['RubbishNamespace']]]], # Collection
 	        ],
 	output =>[
-        ['articleName2', [[String => ['RubbishNamespace']]]], # Simple
+        ['articleName2', [[String => ['RubbishNamespace']]]], # Collection
 	         ],
 	secondary => {
         parametername1 => {




More information about the MOBY-guts mailing list