[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Thu Aug 4 09:05:38 UTC 2005
mwilkinson
Thu Aug 4 05:05:38 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv7617/t
Modified Files:
Client-Central.t
Log Message:
cleaning up code, fixed docs. If tests pass, then commented code will be removed
moby-live/Perl/t Client-Central.t,1.27,1.28
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/08/03 11:30:30 1.27
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/08/04 09:05:38 1.28
@@ -5,7 +5,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
#use SOAP::Lite +trace;
-use Test::More tests => 123; # perldoc Test::More for details
+use Test::More tests => 125; # perldoc Test::More for details
# Test 1
BEGIN { use_ok('MOBY::Client::Central') };
@@ -177,10 +177,9 @@
( ok(!$r->success,"Service registration correctly failed testing secondary datatype format")
) or diag("Service registration failure: ".$r->message) ;
-
-# TEST SHOULD FAIL - testing registration of multiple Simples as part of Collection
+# Test should fail due lack of an articlename on input
$r = $C->registerService(
- serviceName => "myfirstservice",
+ serviceName => "myfirstserviceinputtest",
serviceType => "Retrieval",
authURI => "test.suite.com",
contactEmail => 'your at mail.address',
@@ -188,6 +187,33 @@
category => "moby",
URL => "http://illuminae/cgi-bin/service.pl",
input =>[
+ ['', [Object => ['RubbishNamespace']]], # Simple
+ ],
+ output =>[
+ ['outputarticle', [String => ['RubbishNamespace']]], # Simple
+ ],
+ secondary => {
+ parametername1 => {
+ datatype => 'Integer',
+ default => 0,
+ max => 10,
+ min => -10,
+ enum => [-10, 10, 0]}});
+
+( ok(!$r->success,"Service registration correctly failed testing lack of articleName")
+) or diag("Service registration was supposed to fail due to lack of articleName on input, but didn't: ".$r->message) ;
+
+
+# TEST SHOULD FAIL - testing registration of multiple Simples as part of Collection
+$r = $C->registerService(
+ serviceName => "myfirstservicemultiplesimples",
+ 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'],
@@ -243,7 +269,7 @@
) or diag("Service discovery failure") ;
isa_ok($si, 'ARRAY') or diag("findService didn't return an array ref");
-is(scalar(@$si),1) or diag("findService found too many services");
+is(scalar(@$si),1) or diag("findService found wrong number of services");
$SI = shift @$si;
isa_ok($SI, 'MOBY::Client::ServiceInstance') or diag("findService didn't return a MOBY::Client::ServceInstance");
isa_ok($SI->input, ARRAY) or diag ("ServiceInstance object input is not a listref");
More information about the MOBY-guts
mailing list