Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.BeanSpecification


*/
public class TestInjectBeanWorker extends HiveMindTestCase
{
    private IComponentSpecification newSpec(String beanName, String propertyName, Location location)
    {
        IBeanSpecification bs = new BeanSpecification();
        bs.setPropertyName(propertyName);
        bs.setLocation(location);

        MockControl control = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) control.getMock();

        spec.getBeanNames();
View Full Code Here


*/
public class TestInjectBeanWorker extends HiveMindTestCase
{
    private IComponentSpecification newSpec(String beanName, String propertyName, Location location)
    {
        IBeanSpecification bs = new BeanSpecification();
        bs.setPropertyName(propertyName);
        bs.setLocation(location);

        MockControl control = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) control.getMock();

        spec.getBeanNames();
View Full Code Here

        String className = TargetBean.class.getName();

        trainFindClass(finder, className, TargetBean.class);

        IBeanSpecification spec = new BeanSpecification();
        spec.setClassName(className);

        RuntimeException t = new RuntimeException("Blat!");

        Location l = newLocation();

        IBeanInitializer bi = new BeanInitializerFixture("foo", t);
        bi.setLocation(l);

        spec.addInitializer(bi);

        trainGetExtendedId(component, "Fred/barney");

        replayControls();
View Full Code Here

@Test
public class TestInjectBeanWorker extends BaseComponentTestCase
{
    private IComponentSpecification newSpec(String beanName, String propertyName, Location location)
    {
        IBeanSpecification bs = new BeanSpecification();
        bs.setPropertyName(propertyName);
        bs.setLocation(location);
       
        IComponentSpecification spec = newSpec();

        expect(spec.getBeanNames()).andReturn(Collections.singletonList(beanName));
View Full Code Here

        Class beanClass = bean.value();
        if (beanClass.equals(Object.class))
            beanClass = op.getPropertyType(propertyName);

        IBeanSpecification bs = new BeanSpecification();

        // A shame to convert it to a string then back to
        // a class later, but ...

        bs.setClassName(beanClass.getName());
        bs.setPropertyName(propertyName);

        // Starting to like enums!

        bs.setLifecycle(bean.lifecycle().getBeanLifecycle());

        String initializer = bean.initializer();

        if (HiveMind.isNonBlank(initializer))
            bs.addInitializer(new LightweightBeanInitializer(initializer));

        spec.addBeanSpecification(propertyName, bs);
    }
View Full Code Here

        String className = TargetBean.class.getName();

        trainFindClass(finder, className, TargetBean.class);

        IBeanSpecification spec = new BeanSpecification();
        spec.setClassName(className);

        RuntimeException t = new RuntimeException("Blat!");

        Location l = newLocation();

        IBeanInitializer bi = new BeanInitializerFixture("foo", t);
        bi.setLocation(l);

        spec.addInitializer(bi);

        trainGetExtendedId(component, "Fred/barney");

        replay();
View Full Code Here

        Class beanClass = bean.value();
        if (beanClass.equals(Object.class))
            beanClass = op.getPropertyType(propertyName);

        IBeanSpecification bs = new BeanSpecification();

        // A shame to convert it to a string then back to
        // a class later, but ...

        bs.setClassName(beanClass.getName());
        bs.setPropertyName(propertyName);
        bs.setLocation(location);

        // Starting to like enums!

        bs.setLifecycle(bean.lifecycle().getBeanLifecycle());

        String initializer = bean.initializer();

        if (HiveMind.isNonBlank(initializer))
            bs.addInitializer(new LightweightBeanInitializer(initializer));

        spec.addBeanSpecification(propertyName, bs);
    }
View Full Code Here

*/
public class TestInjectBeanWorker extends HiveMindTestCase
{
    private IComponentSpecification newSpec(String beanName, String propertyName, Location location)
    {
        IBeanSpecification bs = new BeanSpecification();
        bs.setPropertyName(propertyName);
        bs.setLocation(location);

        MockControl control = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) control.getMock();

        spec.getBeanNames();
View Full Code Here

        String className = TargetBean.class.getName();

        trainFindClass(finder, className, TargetBean.class);

        IBeanSpecification spec = new BeanSpecification();
        spec.setClassName(className);

        RuntimeException t = new RuntimeException("Blat!");

        Location l = newLocation();

        IBeanInitializer bi = new BeanInitializerFixture("foo", t);
        bi.setLocation(l);

        spec.addInitializer(bi);

        trainGetExtendedId(component, "Fred/barney");

        replayControls();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.spec.BeanSpecification

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.