NAME
Data::Hive::Test - a bundle of tests for Data::Hive stores
VERSION
version 1.010
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.
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 <rjbs@cpan.org>
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.