Changeset 4440 for trunk/Nebulous-Server/t/03_server_create_object.t
- Timestamp:
- Jun 29, 2005, 4:35:06 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/t/03_server_create_object.t (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/t/03_server_create_object.t
r2872 r4440 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 03_server_create_object.t,v 1. 3 2005-01-03 23:55:29jhoblitt Exp $5 # $Id: 03_server_create_object.t,v 1.4 2005-06-30 02:35:06 jhoblitt Exp $ 6 6 7 7 use strict; … … 12 12 use lib qw( ./t ./lib ); 13 13 14 use PS::IPP::IData::Server;15 use PS::IPP::IData::Util qw( :standard );16 use Test:: IData;14 use Nebulous::Server; 15 use Nebulous::Util qw( :standard ); 16 use Test::Nebulous; 17 17 18 my $ idata = "PS::IPP::IData::Server";18 my $neb = "Nebulous::Server"; 19 19 20 $ idata->setup(20 $neb->setup( 21 21 "DBI:mysql:database=test:host=localhost", 22 22 "test", … … 24 24 ); 25 25 26 Test:: IData->setup;26 Test::Nebulous->setup; 27 27 28 28 { 29 29 # key 30 my $uri = $ idata->create_object( "foo" );30 my $uri = $neb->create_object( "foo" ); 31 31 32 32 ok( -e _get_file_path( $uri ), "file exists" ); … … 34 34 } 35 35 36 Test:: IData->setup;36 Test::Nebulous->setup; 37 37 38 38 { 39 39 # key, class 40 my $uri = $ idata->create_object( "foo", 0 );40 my $uri = $neb->create_object( "foo", 0 ); 41 41 42 42 ok( -e _get_file_path( $uri ), "file exists" ); … … 44 44 } 45 45 46 Test:: IData->setup;46 Test::Nebulous->setup; 47 47 48 48 { 49 49 # key, class, volume 50 my $uri = $ idata->create_object( "foo", 0, "node01" );50 my $uri = $neb->create_object( "foo", 0, "node01" ); 51 51 52 52 ok( -e _get_file_path( $uri ), "file exists" ); … … 54 54 } 55 55 56 Test:: IData->setup;56 Test::Nebulous->setup; 57 57 58 58 { 59 59 # key, class, volume, comment 60 my $uri = $ idata->create_object( "foo", 0, "node01", "this is foo" );60 my $uri = $neb->create_object( "foo", 0, "node01", "this is foo" ); 61 61 62 62 ok( -e _get_file_path( $uri ), "file exists" ); … … 64 64 } 65 65 66 Test:: IData->setup;66 Test::Nebulous->setup; 67 67 68 68 eval { 69 $ idata->create_object( "foo" );70 $ idata->create_object( "foo" );69 $neb->create_object( "foo" ); 70 $neb->create_object( "foo" ); 71 71 }; 72 72 like( $@, qr/Duplicate entry/, "object already exists" ); 73 73 74 Test:: IData->setup;74 Test::Nebulous->setup; 75 75 76 76 eval { 77 $ idata->create_object();77 $neb->create_object(); 78 78 }; 79 79 like( $@, qr/2 - 4 were expected/, "no params" ); 80 80 81 Test:: IData->setup;81 Test::Nebulous->setup; 82 82 83 83 eval { 84 $ idata->create_object( 1, 2, 3, 4, 5 );84 $neb->create_object( 1, 2, 3, 4, 5 ); 85 85 }; 86 86 like( $@, qr/2 - 4 were expected/, "too many params" ); 87 87 88 Test:: IData->cleanup;88 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
