Package org.apache.tapestry.enhance

Examples of org.apache.tapestry.enhance.EnhancementOperation


    }

    public void testClassAnnotationFailure()
    {
        ErrorLog log = newLog();
        EnhancementOperation op = newOp(DeprecatedBean.class);
        IComponentSpecification spec = newSpec();

        MockControl classWorkerc = newControl(ClassAnnotationEnhancementWorker.class);
        ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker) classWorkerc
                .getMock();
View Full Code Here


        verifyControls();
    }

    public void testClassAnnotationNoMatch()
    {
        EnhancementOperation op = newOp(DeprecatedBean.class);
        IComponentSpecification spec = newSpec();

        replayControls();

        AnnotationEnhancementWorker worker = new AnnotationEnhancementWorker();
View Full Code Here

    {
        Method m = findMethod(AnnotatedPage.class, "get"
                + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1));

        MockControl opc = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) opc.getMock();

        op.getPropertyType(propertyName);
        opc.setReturnValue(m.getReturnType());

        IComponentSpecification spec = new ComponentSpecification();

        replayControls();
View Full Code Here

public class TestBeanAnnotationWorker extends BaseAnnotationTestCase
{
    public void testBeanClassSpecified()
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = new ComponentSpecification();

        Method m = findMethod(AnnotatedPage.class, "getMapBean");

        replayControls();
View Full Code Here

    }

    private EnhancementOperation newOp(String propertyName, Class propertyType)
    {
        MockControl opc = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) opc.getMock();

        op.getPropertyType(propertyName);
        opc.setReturnValue(propertyType);

        return op;
    }
View Full Code Here

        return op;
    }

    public void testBeanClassNotSpecified()
    {
        EnhancementOperation op = newOp("hashMapBean", HashMap.class);
        IComponentSpecification spec = new ComponentSpecification();

        Method m = findMethod(AnnotatedPage.class, "getHashMapBean");

        replayControls();
View Full Code Here

        assertNull(bs.getInitializers());
    }

    public void testInitializer()
    {
        EnhancementOperation op = newOp("beanWithInitializer", Target.class);
        IComponentSpecification spec = new ComponentSpecification();

        Method m = findMethod(AnnotatedPage.class, "getBeanWithInitializer");

        replayControls();
View Full Code Here

        assertEquals("intValue=10", lbi.getPropertyName());
    }

    public void testLifecycle()
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = new ComponentSpecification();

        Method m = findMethod(AnnotatedPage.class, "getRenderLifecycleBean");

        replayControls();
View Full Code Here

public class TestComponentClassAnnotationWorker extends BaseAnnotationTestCase
{
    private EnhancementOperation newOp(Class componentClass)
    {
        MockControl control = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) control.getMock();

        op.getBaseClass();
        control.setReturnValue(componentClass);

        return op;
    }
View Full Code Here

        return op;
    }

    private IComponentSpecification attempt(Class baseClass)
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = new ComponentSpecification();

        replayControls();

        new ComponentClassAnnotationWorker().performEnhancement(op, spec, baseClass);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.enhance.EnhancementOperation

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.