Package org.apache.tapestry.ioc

Examples of org.apache.tapestry.ioc.ServiceResources


        {
            Set<DecoratorDef> decorators = module.findMatchingDecoratorDefs(serviceDef);

            if (decorators.isEmpty()) continue;

            ServiceResources resources = new ServiceResourcesImpl(this, module, serviceDef, log);

            for (DecoratorDef dd : decorators)
            {
                ServiceDecorator sd = dd.createDecorator(module, resources);
View Full Code Here


    public void decorator_returns_interceptor() throws Exception
    {
        ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
        Method m = findMethod(fixture, "decoratorReturnsInterceptor");

        ServiceResources resources = mockServiceResources();
        Log log = mockLog();
        fixture._expectedDelegate = mockFieService();
        fixture._interceptorToReturn = mockFieService();
        ModuleBuilderSource source = newSource(fixture);
View Full Code Here

    @Test
    public void decorator_returns_null_interceptor() throws Exception
    {
        ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
        ModuleBuilderSource source = newSource(fixture);
        ServiceResources resources = mockServiceResources();
        Log log = mockLog();
        Object delegate = mockFieService();

        trainForConstructor(resources, log);
View Full Code Here

    @Test
    public void decorator_returns_incorrect_type() throws Exception
    {
        ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
        ModuleBuilderSource source = newSource(fixture);
        ServiceResources resources = mockServiceResources();
        Log log = mockLog();
        fixture._expectedDelegate = mockFieService();
        fixture._interceptorToReturn = newMock(FoeService.class);

        Method m = findMethod(fixture, "decoratorUntyped");
View Full Code Here

    @Test
    public void decorator_method_throws_exception() throws Exception
    {
        ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
        ModuleBuilderSource source = newSource(fixture);
        ServiceResources resources = mockServiceResources();
        Log log = mockLog();
        Object delegate = mockFieService();
        fixture._exception = new RuntimeException("Ouch!");

        trainForConstructor(resources, log);
View Full Code Here

    public void decorator_returns_interceptor() throws Exception
    {
        ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
        Method m = findMethod(fixture, "decoratorReturnsInterceptor");

        ServiceResources resources = mockServiceResources();
        Logger logger = mockLogger();
        fixture._expectedDelegate = mockFieService();
        fixture._interceptorToReturn = mockFieService();
        ModuleBuilderSource source = newSource(fixture);
View Full Code Here

    @Test
    public void decorator_returns_null_interceptor() throws Exception
    {
        ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
        ModuleBuilderSource source = newSource(fixture);
        ServiceResources resources = mockServiceResources();
        Logger logger = mockLogger();
        Object delegate = mockFieService();

        trainForConstructor(resources, logger);
View Full Code Here

    @Test
    public void decorator_returns_incorrect_type() throws Exception
    {
        ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
        ModuleBuilderSource source = newSource(fixture);
        ServiceResources resources = mockServiceResources();
        Logger logger = mockLogger();
        fixture._expectedDelegate = mockFieService();
        fixture._interceptorToReturn = newMock(FoeService.class);

        Method m = findMethod(fixture, "decoratorUntyped");
View Full Code Here

    @Test
    public void decorator_method_throws_exception() throws Exception
    {
        ServiceDecoratorFixture fixture = new ServiceDecoratorFixture();
        ModuleBuilderSource source = newSource(fixture);
        ServiceResources resources = mockServiceResources();
        Logger logger = mockLogger();
        Object delegate = mockFieService();
        fixture._exception = new RuntimeException("Ouch!");

        trainForConstructor(resources, logger);
View Full Code Here

        {
            Set<DecoratorDef> decorators = module.findMatchingDecoratorDefs(serviceDef);

            if (decorators.isEmpty()) continue;

            ServiceResources resources = new ServiceResourcesImpl(this, module, serviceDef,
                    _classFactory, log);

            for (DecoratorDef dd : decorators)
            {
                ServiceDecorator sd = dd.createDecorator(module, resources);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.ServiceResources

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.