Examples of ModuleDef


Examples of org.apache.tapestry.ioc.def.ModuleDef

        log.warn(IOCMessages.decoratorMethodNeedsDelegateParameter(m), null);

        replay();

        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, null);

        assertTrue(md.getDecoratorDefs().isEmpty());

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

    {
        Log log = mockLog();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, _classFactory);

        Set<ContributionDef> defs = md.getContributionDefs();

        assertEquals(defs.size(), 1);

        ContributionDef cd = defs.iterator().next();
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

        Log log = mockLog();
        log.warn(IOCMessages.tooManyContributionParameters(m));

        replay();

        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, null);

        assertTrue(md.getContributionDefs().isEmpty());

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

        Log log = mockLog();
        log.warn(IOCMessages.noContributionParameter(m));

        replay();

        ModuleDef md = new DefaultModuleDefImpl(moduleClass, log, null);

        assertTrue(md.getContributionDefs().isEmpty());

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

    {
        Log log = mockLog();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(AutobuildModule.class, log, _classFactory);

        ServiceDef sd = md.getServiceDef("StringHolder");

        assertEquals(sd.getServiceInterface(), StringHolder.class);
        assertEquals(sd.getServiceId(), "StringHolder");
        assertEquals(sd.getServiceScope(), IOCConstants.DEFAULT_SCOPE);
        assertFalse(sd.isEagerLoad());
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

    {
        Log log = mockLog();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(ComplexAutobuildModule.class, log, _classFactory);

        ServiceDef sd = md.getServiceDef("SH");

        assertEquals(sd.getServiceInterface(), StringHolder.class);
        assertEquals(sd.getServiceId(), "SH");
        assertEquals(sd.getServiceScope(), "magic");
        assertTrue(sd.isEagerLoad());
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

                contains(NonStaticBindMethodModule.class.getName()),
                contains("but is an instance method")));

        replay();

        ModuleDef md = new DefaultModuleDefImpl(NonStaticBindMethodModule.class, log, _classFactory);

        // Prove that the bind method was not invoke

        assertTrue(md.getServiceIds().isEmpty());

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

                StringHolder.class,
                new ToUpperCaseStringHolder());

        replay();

        ModuleDef def = new DefaultModuleDefImpl(MutlipleAutobuildServiceConstructorsModule.class,
                log, _classFactory);

        ServiceDef sd = def.getServiceDef("StringHolder");

        assertNotNull(sd);

        ObjectCreator oc = sd.createServiceCreator(resources);
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

    {
        Log log = mockLog();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(EagerLoadViaAnnotationModule.class, log,
                _classFactory);

        ServiceDef sd = md.getServiceDef("Runnable");

        assertTrue(sd.isEagerLoad());

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.def.ModuleDef

        SymbolProvider provider = new SingleKeySymbolProvider(
                InternalConstants.TAPESTRY_ALIAS_MODE_SYMBOL, "servlet");
        ContributionDef contribution = new SyntheticSymbolSourceContributionDef("AliasMode",
                provider, "before:ApplicationDefaults");

        ModuleDef module = new SyntheticModuleDef(contribution);

        builder.add(module);

        _registry = builder.build();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.