GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::IOC(3) User Contributed Perl Documentation Test::IOC(3)

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.

service_exists $path
container_exists $path
Checks that the path exists in the registry.
service_is $path, $spec
service_isa $path, $class
service_can $path, @methods
service_is_deeply $path, $spec
These methods provide tests akin to Test::More's "is", "isa_ok", "can_ok" and "is_deeply", except that the first argument is used as a path to fetch from the registry.
service_is_singleton $path
service_is_literal $path
service_is_prototype $path
Checks that the service constructor class is of the right type for lifecycle management.
service_alias_ok $real, $alias
Check that the path $real has an alias $alias
container_list_is $parent_path, \@container_names
service_list_is $parent_path, \@service_names
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.
get_service_object $path
Utility function to get the IOC::Service object (not the service itself) for a given path.
locate_container $path
Utility function to call "locateContainer" in IOC::Registry.
locate_service $path
Utility function to call "locateService" in IOC::Registry.
search_for_container $name
Utility function to call "searchForContainer" in IOC::Registry.
search_for_service $name
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.

Yuval Kogman

Copyright 2004-2007 by Infinity Interactive, Inc.

<http://www.iinteractive.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2007-04-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.