Examples of TransformMethodSignature


Examples of org.apache.tapestry.services.TransformMethodSignature

    {
        ClassTransformation tf = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        SetupRender annotation = newSetupRender();

        TransformMethodSignature siga = new TransformMethodSignature("aMethod");
        TransformMethodSignature sigb = new TransformMethodSignature("bMethod");

        train_findMethods(tf, siga, sigb);

        train_getMethodAnnotation(tf, siga, SetupRender.class, annotation);
        train_getMethodAnnotation(tf, sigb, SetupRender.class, annotation);
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

    {
        ClassTransformation tf = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        SetupRender annotation = newSetupRender();

        TransformMethodSignature sig = new TransformMethodSignature("aMethod");

        train_findMethods(tf, sig);

        train_getMethodAnnotation(tf, sig, SetupRender.class, annotation);
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

    {
        ClassTransformation tf = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        SetupRender annotation = newSetupRender();

        TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "void", "aMethod", new String[]
        { MarkupWriter.class.getName() }, null);

        train_findMethods(tf, sig);

        train_getMethodAnnotation(tf, sig, SetupRender.class, annotation);
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

    {
        ClassTransformation tf = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        SetupRender annotation = newSetupRender();

        TransformMethodSignature sig = new TransformMethodSignature(Modifier.PROTECTED, "boolean", "aMethod", null,
                null);

        train_findMethods(tf, sig);

        train_getMethodAnnotation(tf, sig, SetupRender.class, annotation);
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

    {
        ClassTransformation tf = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        SetupRender annotation = newSetupRender();

        TransformMethodSignature siga = new TransformMethodSignature(Modifier.PROTECTED, "boolean", "aMethod", null,
                null);
        TransformMethodSignature sigb = new TransformMethodSignature(Modifier.PUBLIC, "void", "bMethod", new String[]
        { MarkupWriter.class.getName() }, null);

        String ida = "aMethod()";

        train_findMethods(tf, siga, sigb);
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

    {
        ClassTransformation transformation = mockClassTransformation();

        replay();

        TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "void", "myMethod", new String[]
        { MARKUP_WRITER_CLASS_NAME }, null);

        MethodInvocationBuilder invoker = new MethodInvocationBuilder();

        invoker.addParameter(MARKUP_WRITER_CLASS_NAME, "$1");
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

    {
        ClassTransformation transformation = mockClassTransformation();

        replay();

        TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "void", "myMethod", new String[]
        { MARKUP_WRITER_CLASS_NAME }, null);

        MethodInvocationBuilder invoker = new MethodInvocationBuilder();

        assertEquals(invoker.buildMethodInvocation(sig, transformation), "myMethod(null)");
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

    {
        ClassTransformation transformation = mockClassTransformation();

        replay();

        TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "void", "myMethod", new String[]
        { MARKUP_WRITER_CLASS_NAME, LOCALE_CLASS_NAME }, null);

        MethodInvocationBuilder invoker = new MethodInvocationBuilder();

        invoker.addParameter(MARKUP_WRITER_CLASS_NAME, "$1");
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

@Test
public class CachedWorkerTest extends TapestryTestCase
{
    public void must_have_return_type() throws Exception {
        ClassTransformation ct = mockClassTransformation();
        TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "void", "getFoo", new String[0], new String[0]);
       
        expect(ct.findMethodsWithAnnotation(Cached.class)).andReturn(Arrays.asList(sig));
       
        replay();
        try {
View Full Code Here

Examples of org.apache.tapestry.services.TransformMethodSignature

        verify();
    }
   
    public void must_not_have_parameters() throws Exception {
        ClassTransformation ct = mockClassTransformation();
        TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "java.lang.Object", "getFoo", new String[] { "boolean" }, new String[0]);
       
        expect(ct.findMethodsWithAnnotation(Cached.class)).andReturn(Arrays.asList(sig));
       
        replay();
        try {
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.