Package org.apache.tapestry.enhance

Examples of org.apache.tapestry.enhance.EnhancementOperation


    /**
     * No method annotations registered.
     */
    public void testNoAnnotations()
    {
        EnhancementOperation op = newOp(AnnotatedPage.class);
        IComponentSpecification spec = newSpec();

        replayControls();

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


    public void testAnnotationMatch()
    {
        ClassResolver resolver = new DefaultClassResolver();

        EnhancementOperation op = newOp(AnnotatedPage.class);
        IComponentSpecification spec = newSpec();

        MethodAnnotationEnhancementWorker methodWorker = (MethodAnnotationEnhancementWorker) newMock(MethodAnnotationEnhancementWorker.class);

        Method m = findMethod(AnnotatedPage.class, "getInjectedObject");
View Full Code Here

    public void testAnnotationWithSubclass()
    {
        ClassResolver resolver = new DefaultClassResolver();

        EnhancementOperation op = newOp(AnnotatedPageSubclass.class);
        IComponentSpecification spec = newSpec();

        MethodAnnotationEnhancementWorker methodWorker = (MethodAnnotationEnhancementWorker) newMock(MethodAnnotationEnhancementWorker.class);

        Method m = findMethod(AnnotatedPageSubclass.class, "getInjectedObject");
View Full Code Here

        ClassResolver resolver = new DefaultClassResolver();

        ErrorLog log = newLog();
        Throwable t = new RuntimeException("Woops!");

        EnhancementOperation op = newOp(AnnotatedPage.class);
        IComponentSpecification spec = newSpec();

        MockControl methodWorkerc = newControl(MethodAnnotationEnhancementWorker.class);
        MethodAnnotationEnhancementWorker methodWorker = (MethodAnnotationEnhancementWorker) methodWorkerc
                .getMock();
View Full Code Here

    public void testClassAnnotation()
    {
        ClassResolver resolver = new DefaultClassResolver();

        EnhancementOperation op = newOp(DeprecatedBean.class);
        IComponentSpecification spec = newSpec();

        ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker) newMock(ClassAnnotationEnhancementWorker.class);

        AnnotationLocation location = newClassLocation(
View Full Code Here

    public void testClassAnnotationFailure()
    {
        ClassResolver resolver = new DefaultClassResolver();

        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 void testInject()
    {
        Location l = newLocation();

        EnhancementOperation op = newOp();
        IComponentSpecification spec = new ComponentSpecification();

        replayControls();

        Method m = findMethod(AnnotatedPage.class, "getClientPersistentProperty");
View Full Code Here

        assertNotNull(worker._delegate);
    }

    public void testDelegation()
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = newSpec();

        InjectComponentWorker delegate = (InjectComponentWorker) newMock(InjectComponentWorker.class);

        delegate.injectComponent(op, "fred", "fredField");
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.