Data::Hive::Test - a bundle of tests for Data::Hive stores


Data-Hive documentation  | view source Contained in the Data-Hive distribution.

Index


NAME

Top

Data::Hive::Test - a bundle of tests for Data::Hive stores

VERSION

Top

version 1.008

SYNOPSIS

Top

  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

Top

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

Top

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

Top

COPYRIGHT AND LICENSE

Top


Data-Hive documentation  | view source Contained in the Data-Hive distribution.