[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Wed Apr 8 16:16:49 UTC 2009
kawas
Wed Apr 8 12:16:48 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/t
In directory dev.open-bio.org:/tmp/cvs-serv8552/MOBY-Server/t
Modified Files:
Client-Central.t
Log Message:
added some tests to test registration of datatypes with characters that break things in their names.
moby-live/Perl/MOBY-Server/t Client-Central.t,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t 2009/03/26 18:42:20 1.3
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t 2009/04/08 16:16:48 1.4
@@ -218,6 +218,94 @@
$r = $C->deregisterObjectClass( objectType => "Rubbish_Art" );
+# confirm that we cannot register a datatype with odd characters in its name
+$r = $C->registerObjectClass(
+ (
+ objectType => "Rubbish_'Art",
+ description => "a human-readable description of the object",
+ contactEmail => 'your at email.address',
+ authURI => "test.suite.com",
+ Relationships => {
+ ISA => [
+ {
+ object => 'Object',
+ articleName => 'article1'
+ }
+ ],
+ HASA => [
+ {
+ object => 'Object',
+ articleName => 'articleName3'
+ },
+ ]
+ }
+ )
+);
+ok( !$r->success, "Object registration correctly failed" )
+ or diag(
+ "Shouldn't be possible to register Object with an invalid character in its name!"
+ . $r->message );
+$r = $C->deregisterObjectClass( objectType => "Rubbish_'Art" );
+
+# confirm that we cannot register a datatype with odd characters in its name
+$r = $C->registerObjectClass(
+ (
+ objectType => "Rubbish_\"Art",
+ description => "a human-readable description of the object",
+ contactEmail => 'your at email.address',
+ authURI => "test.suite.com",
+ Relationships => {
+ ISA => [
+ {
+ object => 'Object',
+ articleName => 'article1'
+ }
+ ],
+ HASA => [
+ {
+ object => 'Object',
+ articleName => 'articleName3'
+ },
+ ]
+ }
+ )
+);
+ok( !$r->success, "Object registration correctly failed" )
+ or diag(
+ "Shouldn't be possible to register Object with an invalid character in its name!"
+ . $r->message );
+$r = $C->deregisterObjectClass( objectType => "Rubbish_\"Art" );
+
+# confirm that we cannot register a datatype with odd characters in its name
+$r = $C->registerObjectClass(
+ (
+ objectType => "Rubbish_/Art",
+ description => "a human-readable description of the object",
+ contactEmail => 'your at email.address',
+ authURI => "test.suite.com",
+ Relationships => {
+ ISA => [
+ {
+ object => 'Object',
+ articleName => 'article1'
+ }
+ ],
+ HASA => [
+ {
+ object => 'Object',
+ articleName => 'articleName3'
+ },
+ ]
+ }
+ )
+);
+ok( !$r->success, "Object registration correctly failed" )
+ or diag(
+ "Shouldn't be possible to register Object with an invalid character in its name!"
+ . $r->message );
+$r = $C->deregisterObjectClass( objectType => "Rubbish_/Art" );
+
+
############## NAMESPACE REGISTRATION ##############
# Register a new namespace
my %Namespace = (
More information about the MOBY-guts
mailing list