# Path: snakeguice/injector.py
# class ProvidesBinderHelper(object):
#         class GenericProvider(object):
# class Injector(object):
#         class DynamicProvider(object):
#     def bind_providers(self, module, binder):
#     def _build_provider(self, module, type, method):
#             def __init__(self, injector):
#             def get(self):
#     def __init__(self, modules=None, binder=None, stage=None):
#     def add_modules(self, modules):
#     def get_provider(self, cls, annotation=None):
#             def get(self):
#     def get_instance(self, cls, annotation=None):
#     def create_child(self, modules):
#     def create_object(self, cls):
#     def inject_members(self, instance):
# def create_injector(modules):
# 
# Path: snakeguice/binder.py
# class Key(object):
# class _EmptyBinder(object):
# class Binder(object):
# class LazyBinder(object):
# class Binding(object):
# class BinderErrorRecord(object):
#     def __init__(self, interface, annotation=None):
#     def __hash__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def get_binding(self, key):
#     def __init__(self, parent=None):
#     def bind(self, _class, **kwargs):
#     def get_binding(self, key):
#     def create_child(self):
#     def __init__(self, parent=None):
#     def add_error(self, msg):
#     def errors(self):
#     def bind(self, _class, **kwargs):
#     def get_binding(self, key):
#     def create_child(self):
#     def __init__(self, key=None, provider=None, scope=None):
#     def __init__(self, message, location, source):


from snakeguice import create_injector, injector, binder
import cls_heirarchy as ch
#!/usr/bin/env python

"""
injector module unit tests
"""



class FakeModule(object):

    def __init__(self):
        self.binder = None
        self.num_calls = 0

    def configure(self, binder):
        self.binder = binder
        self.num_calls +=1

    def was_called(self):
        return self.num_calls


def test_injector_single_module_init():
    """Create an Injector that accepts a single Module instance."""

    module = FakeModule()

# Path: snakeguice/injector.py
# class ProvidesBinderHelper(object):
#         class GenericProvider(object):
# class Injector(object):
#         class DynamicProvider(object):
#     def bind_providers(self, module, binder):
#     def _build_provider(self, module, type, method):
#             def __init__(self, injector):
#             def get(self):
#     def __init__(self, modules=None, binder=None, stage=None):
#     def add_modules(self, modules):
#     def get_provider(self, cls, annotation=None):
#             def get(self):
#     def get_instance(self, cls, annotation=None):
#     def create_child(self, modules):
#     def create_object(self, cls):
#     def inject_members(self, instance):
# def create_injector(modules):
# 
# Path: snakeguice/binder.py
# class Key(object):
# class _EmptyBinder(object):
# class Binder(object):
# class LazyBinder(object):
# class Binding(object):
# class BinderErrorRecord(object):
#     def __init__(self, interface, annotation=None):
#     def __hash__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def get_binding(self, key):
#     def __init__(self, parent=None):
#     def bind(self, _class, **kwargs):
#     def get_binding(self, key):
#     def create_child(self):
#     def __init__(self, parent=None):
#     def add_error(self, msg):
#     def errors(self):
#     def bind(self, _class, **kwargs):
#     def get_binding(self, key):
#     def create_child(self):
#     def __init__(self, key=None, provider=None, scope=None):
#     def __init__(self, message, location, source):


# Path: tests/test_injector.py
from snakeguice import create_injector, injector, binder
import cls_heirarchy as ch

#!/usr/bin/env python

"""
injector module unit tests
"""



class FakeModule(object):

    def __init__(self):
        self.binder = None
        self.num_calls = 0

    def configure(self, binder):
        self.binder = binder
        self.num_calls +=1

    def was_called(self):
        return self.num_calls


def test_injector_single_module_init():
    """Create an Injector that accepts a single Module instance."""

    module = FakeModule()

    inj = injector.Injector(module)