Package org.apache.tapestry.ioc

Examples of org.apache.tapestry.ioc.ServiceResources


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

        trainForConstructor(resources, log);
View Full Code Here


public class SingletonServiceLifecycleTest extends IOCInternalTestCase
{
    @Test
    public void test()
    {
        ServiceResources resources = newServiceResources();
        ObjectCreator creator = newObjectCreator();
        Object expected = new Object();

        train_createObject(creator, expected);
View Full Code Here

    private List<ServiceDecorator> convertDecoratorDefsToServiceDecorators(
            List<DecoratorDef> ordered, ServiceDef serviceDef, Log log)
    {
        List<ServiceDecorator> result = newList();

        ServiceResources resources = null;
        String moduleId = null;
        Module module = null;

        for (DecoratorDef dd : ordered)
        {
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

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

        ServiceResources resources = newServiceResources();
        Log log = newLog();
        fixture._expectedDelegate = newFieService();
        fixture._interceptorToReturn = newFieService();
        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 = newServiceResources();
        Log log = newLog();
        Object delegate = newFieService();

        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 = newServiceResources();
        Log log = newLog();
        fixture._expectedDelegate = newFieService();
        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 = newServiceResources();
        Log log = newLog();
        Object delegate = newFieService();
        fixture._exception = new RuntimeException("Ouch!");

        trainForConstructor(resources, log);
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.