Index: trunk/Nebulous-Server/Build.PL
===================================================================
--- trunk/Nebulous-Server/Build.PL	(revision 12648)
+++ trunk/Nebulous-Server/Build.PL	(revision 12960)
@@ -97,4 +97,5 @@
         'File::Temp'            => 0,
         'Test::More'            => '0.49',
+        'Test::URI'             => '1.06',
     },
     recommends          => {
Index: trunk/Nebulous-Server/t/03_server_create_object.t
===================================================================
--- trunk/Nebulous-Server/t/03_server_create_object.t	(revision 12648)
+++ trunk/Nebulous-Server/t/03_server_create_object.t	(revision 12960)
@@ -3,5 +3,5 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 03_server_create_object.t,v 1.11 2006-12-08 03:29:19 jhoblitt Exp $
+# $Id: 03_server_create_object.t,v 1.12 2007-04-23 20:42:29 jhoblitt Exp $
 
 use strict;
@@ -15,4 +15,6 @@
 use Nebulous::Util qw( :standard );
 use Test::Nebulous;
+use Test::URI;
+use URI::Split qw( uri_split );
 
 my $neb = Nebulous::Server->new(
@@ -26,8 +28,9 @@
 {
     # key
-    my $uri = $neb->create_object( "foo" );
+    my $uri = $neb->create_object("foo");
 
-    ok( -e _get_file_path( $uri ), "file exists" );
-    like( $uri, qr/^file:\//, "valid URI" );
+    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
+    ok(-e $path, "file exists");
+    uri_scheme_ok($uri, 'file');
 }
 
@@ -36,8 +39,9 @@
 {
     # key, class
-    my $uri = $neb->create_object( "foo", 0 );
+    my $uri = $neb->create_object("foo", 0);
 
-    ok( -e _get_file_path( $uri ), "file exists" );
-    like( $uri, qr/^file:\//, "valid URI" );
+    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
+    ok(-e $path, "file exists");
+    uri_scheme_ok($uri, 'file');
 }
 
@@ -46,8 +50,9 @@
 {
     # key, class, volume
-    my $uri = $neb->create_object( "foo", 0, "node01" );
+    my $uri = $neb->create_object("foo", 0, "node01");
 
-    ok( -e _get_file_path( $uri ), "file exists" );
-    like( $uri, qr/^file:\//, "valid URI" );
+    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
+    ok(-e $path, "file exists");
+    uri_scheme_ok($uri, 'file');
 }
 
@@ -56,8 +61,9 @@
 {
     # key, class, volume, comment
-    my $uri = $neb->create_object( "foo", 0, "node01", "this is foo" );
+    my $uri = $neb->create_object("foo", 0, "node01", "this is foo");
 
-    ok( -e _get_file_path( $uri ), "file exists" );
-    like( $uri, qr/^file:\//, "valid URI" );
+    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
+    ok(-e $path, "file exists");
+    uri_scheme_ok($uri, 'file');
 }
 
@@ -65,15 +71,16 @@
 
 eval {
-    $neb->create_object( "foo" );
-    $neb->create_object( "foo" );
+    $neb->create_object("foo");
+    $neb->create_object("foo");
 };
-like( $@, qr/Duplicate entry/, "object already exists" );
+like($@, qr/Duplicate entry/, "object already exists");
 
 Test::Nebulous->setup;
 
 {
-    my $uri = $neb->create_object( "foo", 1 );
+    my $uri = $neb->create_object("foo", 1);
 
-    ok( -e _get_file_path( $uri ), "class exists" );
+    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
+    ok(-e $path, "class exists");
 }
 
@@ -81,14 +88,14 @@
 
 eval {
-    $neb->create_object( "foo", 99 );
+    $neb->create_object("foo", 99);
 };
-like( $@, qr/did not pass the \'is valid class id\'/, "class doesn't exist" );
+like($@, qr/did not pass the \'is valid class id\'/, "class doesn't exist");
 
 Test::Nebulous->setup;
 
 eval {
-    $neb->create_object( 1, 0, 'node01', 'x' x 256 );
+    $neb->create_object(1, 0, 'node01', 'x' x 256);
 };
-like( $@, qr/comment length/, "comment is too long" );
+like($@, qr/comment length/, "comment is too long");
 
 Test::Nebulous->setup;
@@ -97,5 +104,5 @@
     $neb->create_object();
 };
-like( $@, qr/2 - 4 were expected/, "no params" );
+like($@, qr/2 - 4 were expected/, "no params");
 
 Test::Nebulous->setup;
@@ -104,5 +111,5 @@
     $neb->create_object( 1, 0, 'node01', 1, 1 );
 };
-like( $@, qr/2 - 4 were expected/, "too many params" );
+like($@, qr/2 - 4 were expected/, "too many params");
 
 Test::Nebulous->cleanup;
Index: trunk/Nebulous-Server/t/04_server_replicate_object.t
===================================================================
--- trunk/Nebulous-Server/t/04_server_replicate_object.t	(revision 12648)
+++ trunk/Nebulous-Server/t/04_server_replicate_object.t	(revision 12960)
@@ -3,5 +3,5 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 04_server_replicate_object.t,v 1.6 2006-12-08 03:29:19 jhoblitt Exp $
+# $Id: 04_server_replicate_object.t,v 1.7 2007-04-23 20:42:29 jhoblitt Exp $
 
 use strict;
@@ -15,4 +15,6 @@
 use Nebulous::Util qw( :standard );
 use Test::Nebulous;
+use Test::URI;
+use URI::Split qw( uri_split );
 
 my $neb = Nebulous::Server->new(
@@ -26,9 +28,10 @@
 {
     # key
-    $neb->create_object( "foo" );
-    my $uri = $neb->replicate_object( "foo" );
+    $neb->create_object("foo");
+    my $uri = $neb->replicate_object("foo");
 
-    ok( -e _get_file_path( $uri ), "file exists" );
-    like( $uri, qr/^file:\//, "valid URI" );
+    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
+    ok(-e $path, "file exists");
+    uri_scheme_ok($uri, 'file');
 }
 
@@ -37,9 +40,10 @@
 {
     # key, $volume
-    $neb->create_object( "foo" );
-    my $uri = $neb->replicate_object( "foo", "node01" );
+    $neb->create_object("foo");
+    my $uri = $neb->replicate_object("foo", "node01");
 
-    ok( -e _get_file_path( $uri ), "file exists" );
-    like( $uri, qr/^file:\//, "valid URI" );
+    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
+    ok(-e $path, "file exists");
+    uri_scheme_ok($uri, 'file');
 }
 
@@ -48,12 +52,19 @@
 {
     # key, $volume
-    $neb->create_object( "foo" );
-    my $uri1 = $neb->replicate_object( "foo", "node01" );
-    my $uri2 = $neb->replicate_object( "foo", "node02" );
+    $neb->create_object("foo");
+    my $uri1 = $neb->replicate_object("foo", "node01");
+    my $uri2 = $neb->replicate_object("foo", "node02");
 
-    ok( -e _get_file_path( $uri1 ), "file exists" );
-    ok( -e _get_file_path( $uri2 ), "file exists" );
-    like( $uri1, qr/^file:\//, "valid URI" );
-    like( $uri2, qr/^file:\//, "valid URI" );
+    {
+        my ($scheme, $auth, $path, $query, $frag) = uri_split($uri1);
+        ok(-e $path, "file exists");
+        uri_scheme_ok($uri1, 'file');
+    }
+
+    {
+        my ($scheme, $auth, $path, $query, $frag) = uri_split($uri2);
+        ok(-e $path, "file exists");
+        uri_scheme_ok($uri2, 'file');
+    }
 }
 
@@ -61,7 +72,7 @@
 
 eval {
-    $neb->replicate_object( "foo" );
+    $neb->replicate_object("foo");
 };
-like( $@, qr/storage object does not exist/, "storage object does not exist" );
+like($@, qr/storage object does not exist/, "storage object does not exist");
 
 Test::Nebulous->setup;
@@ -70,12 +81,12 @@
     $neb->replicate_object();
 };
-like( $@, qr/1 - 2 were expected/, "no params" );
+like($@, qr/1 - 2 were expected/, "no params");
 
 Test::Nebulous->setup;
 
 eval {
-    $neb->replicate_object( 1, 2, 3 );
+    $neb->replicate_object(1, 2, 3);
 };
-like( $@, qr/1 - 2 were expected/, "too many params" );
+like($@, qr/1 - 2 were expected/, "too many params");
 
 Test::Nebulous->cleanup;
