[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Aug 23 18:26:21 UTC 2005


mwilkinson
Tue Aug 23 14:26:20 EDT 2005
Update of /home/repository/moby/moby-live/Perl/t
In directory pub.open-bio.org:/tmp/cvs-serv22721/t

Modified Files:
	Client-Central.t 
Log Message:
add test for identical articleName at same XML level - should fail object registration

moby-live/Perl/t Client-Central.t,1.30,1.31
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/08/17 17:59:24	1.30
+++ /home/repository/moby/moby-live/Perl/t/Client-Central.t	2005/08/23 18:26:20	1.31
@@ -5,7 +5,7 @@
 
 # change 'tests => 1' to 'tests => last_test_to_print';
 #use SOAP::Lite +trace;
-use Test::More tests => 127; # perldoc Test::More for details
+use Test::More tests => 128; # perldoc Test::More for details
 
 # Test 1
 BEGIN { use_ok('MOBY::Client::Central') };
@@ -30,7 +30,7 @@
 
 ################## MOBY Registration Tests #################
 
-# Test 3  inherits from two isas - should fail
+# Test  inherits from two isas - should fail
 $r = $C->registerObjectClass(objectType => "Rubbish",
                 description => "a human-readable description of the object",
 				contactEmail => 'your at email.address',
@@ -65,7 +65,7 @@
 
 
 
-# Test 4  should succeed
+# Test  Good registration should succeed
 $r = $C->registerObjectClass(objectType => "Rubbish",
                 description => "a human-readable description of the object",
 				contactEmail => 'your at email.address',
@@ -80,10 +80,22 @@
  or diag("Object registration failure: ".$r->message));
 
 
+# Test  Should end up with identical articleName at same level and therefore fail
+$r = $C->registerObjectClass(objectType => "Rubbish2",
+                description => "a human-readable description of the object",
+				contactEmail => 'your at email.address',
+                authURI => "test.suite.com",
+			    Relationships => {
+					ISA => [
+						['Rubbish', 'article1']],
+					HASA => [
+						['Object', 'articleName3']]}
+                       );
+( ok($r->success,"Object registration correctly failed with identical articlename at same level of XML")
+ or diag("Object registration should have failed with identical articleName at same XML level, but didn't: ".$r->message));
 
 
-
-# Test 5
+# Test 6
 $r = $C->deregisterObjectClass(objectType => "Rubbish");
 ( ok($r->success,"Object deregistration successful"))
 or diag("Object deregistration failure: ".$r->message) ;




More information about the MOBY-guts mailing list