Show
Ignore:
Timestamp:
04/24/07 16:43:36 (2 years ago)
Author:
kindlund
Message:

Finished initial implementation of multi-value XML configuration data.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-multi_config/t/honeyclient_util_config.t

    r131 r256  
    8383is($value, "localhost", "getVar(name => 'address', namespace => 'HoneyClient::Util::Config::Test::Undefined::Child', attribute => 'default')")  
    8484    or diag("The getVar() call failed.  Attempted to get attribute 'default' for variable 'address' using namespace 'HoneyClient::Util::Config::Test::Undefined::Child' within the global configuration file."); 
     85 
     86# This check tests to make sure getVar() returns the expected hashref 
     87# when getting data from a target element that contains child sub-elements. 
     88$value = getVar(name => "Yok", namespace => "HoneyClient::Util::Config::Test"); 
     89my $expectedValue = { 
     90    'childA' => [ '12345678', 'ABCDEFGH' ], 
     91    'childB' => [ '09876543', 'ZYXVTUWG' ], 
     92}; 
     93is_deeply($value, $expectedValue, "getVar(name => 'Yok', namespace => 'HoneyClient::Util::Config::Test')")  
     94    or diag("The getVar() call failed.  Attempted to get variable 'Yok' using namespace 'HoneyClient::Util::Config::Test' within the global configuration file."); 
    8595} 
    8696