my $debug = shift @ARGV;
-use Test::More tests => 47;
+use Test::More tests => 32;
use Data::Dump qw/dump/;
use Cwd qw/abs_path/;
use lib 'lib';
BEGIN {
use_ok('CWMP::Store');
- use_ok('CWMP::Store::DBMDeep');
use_ok('CWMP::Store::YAML');
use_ok('CWMP::Store::JSON');
}
is_deeply( $state, $store_state, 'state ID same as uid' );
- ok( $store->update_state( {
+ $state = {
DeviceID => {
SerialNumber => 123456,
},
baz => 12345
- } ), 'update_state existing' );
+ };
- $state->{baz} = 12345;
+ ok( $store->set_state( 123456, $state ), 'set_state' );
is_deeply( $store->get_state( 123456 ), $state, 'get_state' );
is_deeply( [ $store->all_uids ], [ 123456, 99999 ], 'all_uids' );
- undef $store;
-
}
# now test all stores
-test_store('DBMDeep');
test_store('YAML');
test_store('JSON');