Data::Hive::Test - a bundle of tests for Data::Hive stores
version 1.013
use Test::More; use Data::Hive::Test; use Data::Hive::Store::MyNewStore; Data::Hive::Test->test_new_hive({ store_class => 'MyNewStore' }); # rest of your tests for your store done_testing;
Data::Hive::Test is a library of tests that should be passable for any conformant Data::Hive::Store implementation. It provides a method for running a suite of tests -- which may expand or change -- that check the behavior of a hive store by building a hive around it and testing its behavior.
Data::Hive::Test->test_new_hive( $desc, \%args_to_NEW );
This method expects an (optional) description followed by a hashref of arguments to be passed to Data::Hive's NEW method. A new hive will be constructed with those arguments and a single subtest will be run, including subtests that should pass against any conformant Data::Hive::Store implementation.
NEW
If the tests pass, the method will return the hive. If they fail, the method will return false.
Data::Hive::Test->test_existing_hive( $desc, $hive );
This method behaves just like test_new_hive, but expects a hive rather than arguments to use to build one.
test_new_hive
Hans Dieter Pearcey <hdp@cpan.org>
Ricardo Signes <rjbs@cpan.org>
This software is copyright (c) 2006 by Hans Dieter Pearcey.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Data::Hive, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Hive
CPAN shell
perl -MCPAN -e shell install Data::Hive
For more information on module installation, please visit the detailed CPAN module installation guide.