NAME
Data::Hive::Test - a bundle of tests for Data::Hive stores
VERSION
version 1.015
SYNOPSIS
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;
DESCRIPTION
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.
PERL VERSION
This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.
METHODS
test_new_hive
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.
If the tests pass, the method will return the hive. If they fail, the method will return false.
test_existing_hive
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.
AUTHORS
Hans Dieter Pearcey <hdp@cpan.org>
Ricardo Signes <cpan@semiotic.systems>
COPYRIGHT AND LICENSE
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.