[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Tue Aug 2 15:18:00 UTC 2005
mwilkinson
Tue Aug 2 11:18:00 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv310/t
Modified Files:
Client-Central.t
Log Message:
new API prevents inheritence from Primitives. This is now enforced by the registry. Added tests to ensure that this works.
moby-live/Perl/t Client-Central.t,1.25,1.26
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/07/29 17:40:58 1.25
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/08/02 15:18:00 1.26
@@ -4,8 +4,8 @@
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
-#use SOAP::Lite +trace;
-use Test::More tests => 122; # perldoc Test::More for details
+use SOAP::Lite +trace;
+use Test::More tests => 123; # perldoc Test::More for details
# Test 1
BEGIN { use_ok('MOBY::Client::Central') };
@@ -15,7 +15,8 @@
# Test 2
my $C = MOBY::Client::Central->new(
Registries => {
- mobycentral => { URL => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/MOBY-Central.pl',
+ mobycentral => { URL =>
+'http://localhost/cgi-bin/MOBY-Central.pl',
URI => 'http://mobycentral.icapture.ubc.ca/MOBY/Central'}
}
);
@@ -29,7 +30,7 @@
################## MOBY Registration Tests #################
-# Test 3
+# Test 3 inherits from two isas - should fail
$r = $C->registerObjectClass(objectType => "Rubbish",
description => "a human-readable description of the object",
contactEmail => 'your at email.address',
@@ -46,8 +47,25 @@
+# Test inherits from primitive type - should fail
+$r = $C->registerObjectClass(objectType => "Rubbish",
+ description => "a human-readable description of the object",
+ contactEmail => 'your at email.address',
+ authURI => "test.suite.com",
+ Relationships => {
+ ISA => [
+ ['String', 'article1'],
+ ],
+ HASA => [
+ ['Object', 'articleName3']]}
+ );
+( ok(!$r->success,"Object registration correctly failed")
+ or diag("Object registration inheritence from primitive test failure: ".$r->message));
+
+
+
-# Test 4
+# Test 4 should succeed
$r = $C->registerObjectClass(objectType => "Rubbish",
description => "a human-readable description of the object",
contactEmail => 'your at email.address',
@@ -133,7 +151,7 @@
-# Test 9 # should fail
+# Test 9 # should fail due to datatype all caps
$r = $C->registerService(
serviceName => "myfirstservice",
serviceType => "Retrieval",
More information about the MOBY-guts
mailing list