Package org.apache.tapestry.enhance

Examples of org.apache.tapestry.enhance.EnhancementOperation


                + "  return getMessages().format(\"message-with-primitives\", params);\n}\n");
    }

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

        Method method = findMethod(AnnotatedPage.class, "voidMessage");

        replayControls();
View Full Code Here


    }

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

        Method method = findMethod(AnnotatedPage.class, "getLikeGetter");

        op.addMethod(
                Modifier.PUBLIC,
                new MethodSignature(method),
                "{\n  return getMessages().getMessage(\"like-getter\");\n}\n");
        op.claimProperty("likeGetter");

        replayControls();

        new MessageAnnotationWorker().performEnhancement(op, spec, method, null);
View Full Code Here

        verifyControls();
    }

    private void attempt(String methodName, String codeBlock)
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = newSpec();

        Method method = findMethod(AnnotatedPage.class, methodName);

        op.addMethod(Modifier.PUBLIC, new MethodSignature(method), codeBlock);

        replayControls();

        new MessageAnnotationWorker().performEnhancement(op, spec, method, null);
View Full Code Here

        assertNotNull(worker._delegate);
    }

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

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

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

*/
public class TestPersistAnnotationWorker extends TestAnnotationEnhancementWorker
{
    public void testInject()
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = new ComponentSpecification();

        replayControls();

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

{
    private IContainedComponent run(String id, String methodName)
    {
        Method method = findMethod(AnnotatedPage.class, methodName);

        EnhancementOperation op = newOp();

        replayControls();

        IComponentSpecification spec = new ComponentSpecification();
View Full Code Here

    }

    private IComponentSpecification execute(MethodAnnotationEnhancementWorker worker,
            String methodName)
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = new ComponentSpecification();

        Method method = findMethod(AnnotatedPage.class, methodName);

        replayControls();
View Full Code Here

        assertNotNull(worker._delegate);
    }

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

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

        delegate.injectState(op, "barneyASO", "barney");
View Full Code Here

*/
public class TestAssetAnnotationWorker extends BaseAnnotationTestCase
{
    public void testSuccess()
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = new ComponentSpecification();

        replayControls();

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

                "return getMessages().format(\"message-with-primitives\", new java.lang.Object[] { ($w) $1, ($w) $2 });");
    }

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

        Method method = findMethod(AnnotatedPage.class, "voidMessage");

        replayControls();
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.