Add a method to Storage to return the hex value of the storageId.

Add a test for it.
Convert Storage to use that everywhere, instead of calculating and recalculating it.
This commit is contained in:
Colin Kuskie 2009-05-20 18:37:00 +00:00
parent ac9ccc496c
commit 67df78608d
3 changed files with 29 additions and 14 deletions

View file

@ -29,7 +29,7 @@ my $cwd = Cwd::cwd();
my ($extensionTests, $fileIconTests) = setupDataDrivenTests($session);
my $numTests = 102; # increment this value for each test you create
my $numTests = 103; # increment this value for each test you create
plan tests => $numTests + scalar @{ $extensionTests } + scalar @{ $fileIconTests };
my $uploadDir = $session->config->get('uploadsPath');
@ -142,7 +142,7 @@ undef $storage3;
####################################################
#
# create
# create, getHexId
#
####################################################
@ -150,6 +150,7 @@ $storage1 = WebGUI::Storage->create($session);
isa_ok( $storage1, "WebGUI::Storage");
ok($session->id->valid($storage1->getId), 'create returns valid sessionIds');
is($storage1->getHexId, $session->id->toHex($storage1->getId), 'getHexId, returns the hexadecimal value of the GUID');
is( $storage1->getErrorCount, 0, "No errors during object creation");