Examples of IBeanSpecification


Examples of org.apache.tapestry.spec.IBeanSpecification

     */

    public void testBeanInject() throws Exception
    {
        IComponentSpecification cs = parseComponent("BeanInject.jwc");
        IBeanSpecification bs = cs.getBeanSpecification("bean");
        assertEquals("myProperty", bs.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

*/
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

Examples of org.apache.tapestry.spec.IBeanSpecification

{

    public void testBeanProperty() throws Exception
    {
        IComponentSpecification s = parseComponent("BeanProperty.jwc");
        IBeanSpecification fred = s.getBeanSpecification("fred");

        checkList("propertyNames", new String[]
        { "bruce", "nicole", "zeta" }, fred.getPropertyNames());

        checkProperty(fred, "bruce", "wayne");
        checkProperty(fred, "nicole", "kidman");
        checkProperty(fred, "zeta", "jones");
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

        while (i.hasNext())
        {
            String name = (String) i.next();

            IBeanSpecification bs = spec.getBeanSpecification(name);

            String propertyName = bs.getPropertyName();
            if (propertyName != null)
            {
                try
                {
                    injectBean(op, name, propertyName);
                }
                catch (Exception ex)
                {
                    _errorLog.error(EnhanceMessages.errorAddingProperty(propertyName, op
                            .getBaseClass(), ex), bs.getLocation(), ex);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

        new BeanAnnotationWorker().performEnhancement(op, spec, m, l);

        verify();

        IBeanSpecification bs = spec.getBeanSpecification("mapBean");

        assertEquals("mapBean", bs.getPropertyName());
        assertEquals(HashMap.class.getName(), bs.getClassName());
        assertEquals(BeanLifecycle.REQUEST, bs.getLifecycle());
        assertSame(l, bs.getLocation());
        assertNull(bs.getInitializers());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

        new BeanAnnotationWorker().performEnhancement(op, spec, m, l);

        verify();

        IBeanSpecification bs = spec.getBeanSpecification("hashMapBean");

        assertEquals("hashMapBean", bs.getPropertyName());
        assertEquals(HashMap.class.getName(), bs.getClassName());
        assertEquals(BeanLifecycle.REQUEST, bs.getLifecycle());
        assertSame(l, bs.getLocation());
        assertNull(bs.getInitializers());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

        new BeanAnnotationWorker().performEnhancement(op, spec, m, null);

        verify();

        IBeanSpecification bs = spec.getBeanSpecification("beanWithInitializer");

        List l = bs.getInitializers();
        LightweightBeanInitializer lbi = (LightweightBeanInitializer) l.get(0);

        assertEquals("intValue=10", lbi.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

        new BeanAnnotationWorker().performEnhancement(op, spec, m, null);

        verify();

        IBeanSpecification bs = spec.getBeanSpecification("renderLifecycleBean");

        assertEquals(BeanLifecycle.RENDER, bs.getLifecycle());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

{

    public void testBeanProperty() throws Exception
    {
        IComponentSpecification s = parseComponent("BeanProperty.jwc");
        IBeanSpecification fred = s.getBeanSpecification("fred");

        checkList("propertyNames", new String[]
        { "bruce", "nicole", "zeta" }, fred.getPropertyNames());

        checkProperty(fred, "bruce", "wayne");
        checkProperty(fred, "nicole", "kidman");
        checkProperty(fred, "zeta", "jones");
View Full Code Here

Examples of org.apache.tapestry.spec.IBeanSpecification

    public void testMessageBeanInitializer() throws Exception
    {
        IComponentSpecification spec = parsePage("MessageBeanInitializer.page");

        IBeanSpecification bs = spec.getBeanSpecification("fred");
        checkLine(bs, 24);
        BindingBeanInitializer i = (BindingBeanInitializer) bs.getInitializers().get(0);

        assertEquals("barney", i.getPropertyName());
        assertEquals("message:rubble", i.getBindingReference());
        checkLine(i, 25);
    }
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.