Index: /trunk/Nebulous-Server/t/21_client_move.t
===================================================================
--- /trunk/Nebulous-Server/t/21_client_move.t	(revision 2881)
+++ /trunk/Nebulous-Server/t/21_client_move.t	(revision 2881)
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+
+# Copryight (C) 2004-2005  Joshua Hoblitt
+#
+# $Id: 21_client_move.t,v 1.1 2005-01-04 02:48:31 jhoblitt Exp $
+
+use strict;
+use warnings FATAL => qw( all );
+
+use Apache::Test qw( -withtestmore );
+
+plan tests => 8;
+
+use lib qw( ./t ./lib );
+
+use PS::IPP::IData::Client;
+use PS::IPP::IData::Util qw( :standard );
+use Test::IData;
+
+my $hostport = Apache::Test->config->{ 'hostport' };
+
+Test::IData->setup;
+
+{
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+    $idata->create( "foo" );
+
+    ok( $idata->move( "foo", "foobar" ), "move object" );
+
+    my $locations1 = $idata->find_instances( "foo" );
+    my $locations2 = $idata->find_instances( "foobar" );
+
+    is( $locations1, undef, "old object has no instances" );
+    is( scalar @$locations2, 1, "new object has an instances" );
+}
+
+Test::IData->setup;
+
+{
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+
+    ok( ! $idata->move( "foo", "foobar" ), "move non-existant object" );
+
+    my $locations = $idata->find_instances( "foobar" );
+
+    is( $locations, undef, "new object has no instances" );
+}
+
+Test::IData->setup;
+
+eval {
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+    $idata->move();
+};
+like( $@, qr/2 were expected/, "no params" );
+
+Test::IData->setup;
+
+eval {
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+    $idata->move( "foo" );
+};
+like( $@, qr/2 were expected/, "not enough params" );
+
+Test::IData->setup;
+
+eval {
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+    $idata->move( "foo", "bar", "baz" );
+};
+like( $@, qr/2 were expected/, "too many params" );
+
+Test::IData->cleanup;
Index: /trunk/Nebulous/t/21_client_move.t
===================================================================
--- /trunk/Nebulous/t/21_client_move.t	(revision 2881)
+++ /trunk/Nebulous/t/21_client_move.t	(revision 2881)
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+
+# Copryight (C) 2004-2005  Joshua Hoblitt
+#
+# $Id: 21_client_move.t,v 1.1 2005-01-04 02:48:31 jhoblitt Exp $
+
+use strict;
+use warnings FATAL => qw( all );
+
+use Apache::Test qw( -withtestmore );
+
+plan tests => 8;
+
+use lib qw( ./t ./lib );
+
+use PS::IPP::IData::Client;
+use PS::IPP::IData::Util qw( :standard );
+use Test::IData;
+
+my $hostport = Apache::Test->config->{ 'hostport' };
+
+Test::IData->setup;
+
+{
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+    $idata->create( "foo" );
+
+    ok( $idata->move( "foo", "foobar" ), "move object" );
+
+    my $locations1 = $idata->find_instances( "foo" );
+    my $locations2 = $idata->find_instances( "foobar" );
+
+    is( $locations1, undef, "old object has no instances" );
+    is( scalar @$locations2, 1, "new object has an instances" );
+}
+
+Test::IData->setup;
+
+{
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+
+    ok( ! $idata->move( "foo", "foobar" ), "move non-existant object" );
+
+    my $locations = $idata->find_instances( "foobar" );
+
+    is( $locations, undef, "new object has no instances" );
+}
+
+Test::IData->setup;
+
+eval {
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+    $idata->move();
+};
+like( $@, qr/2 were expected/, "no params" );
+
+Test::IData->setup;
+
+eval {
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+    $idata->move( "foo" );
+};
+like( $@, qr/2 were expected/, "not enough params" );
+
+Test::IData->setup;
+
+eval {
+    my $idata = PS::IPP::IData::Client->new(
+        proxy => "http://$hostport/idata",
+    );
+    $idata->move( "foo", "bar", "baz" );
+};
+like( $@, qr/2 were expected/, "too many params" );
+
+Test::IData->cleanup;
