Test::IOC - Test IOC registries
use Test::More; use Test::IOC; use MyIOCStuff; service_exists("/app/log_file"); service_is_literal("/app/log_file"); service_exists("/app/logger"); service_is_singleton("/app/logger"); service_can("/app/logger", qw/warn debug/);
This module provides some simple facilities to test IOC registries for correctness.
This module is still in development, so use at your own risk. But then again, its for tests, so thats not very risky anyway.
Checks that the path exists in the registry.
These methods provide tests akin to Test::More's
is_deeply, except that the first argument is used as a path to fetch from the registry.
Checks that the service constructor class is of the right type for lifecycle management.
Check that the path $real has an alias $alias
Check that the child elements under $parent_path are as listed in the service name array reference. The names don't have to be sorte.
Utility function to get the IOC::Service object (not the service itself) for a given path.
Utility function to call "locateContainer" in IOC::Registry.
Utility function to call "locateService" in IOC::Registry.
Utility function to call "searchForContainer" in IOC::Registry.
Utility function to call "searchForService" in IOC::Registry.
None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it.
Copyright 2004-2007 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.