Examples of OnEvent


Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void filter_by_event_type()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        String[] eventTypes = new String[]
        { "gnip", "gnop" };

        MethodSignature signature = new MethodSignature("foo");
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void filter_by_component_id()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        String[] componentIds = new String[]
        { "zork" };

        MethodSignature signature = new MethodSignature("foo");
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void filter_by_both()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        String[] eventTypes = new String[]
        { "gnip", "gnop" };
        String[] componentIds = new String[]
        { "zork" };
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void method_with_non_void_return_value()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        MethodSignature signature = new MethodSignature(Modifier.PRIVATE, "java.lang.String",
                "foo", null, null);

        train_findMethods(ct, signature);
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void method_with_non_primitive_parameter()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        MethodSignature signature = new MethodSignature(Modifier.PRIVATE, "void", "foo",
                new String[]
                { "java.lang.String" }, null);
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void method_with_primitive_parameter()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        MethodSignature signature = new MethodSignature(Modifier.PRIVATE, "void", "foo",
                new String[]
                { "boolean" }, null);
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void method_with_multiple_parameters()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        MethodSignature signature = new MethodSignature(Modifier.PRIVATE, "void", "foo",
                new String[]
                { "java.lang.String", "java.lang.Integer" }, null);
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void method_include_context()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        MethodSignature signature = new MethodSignature(Modifier.PRIVATE, "void", "foo",
                new String[]
                { "java.lang.String", OnEventWorker.OBJECT_ARRAY_TYPE, "java.lang.Integer" }, null);
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

            builder.begin();

            closeCount++;
        }

        OnEvent annotation = transformation.getMethodAnnotation(method, OnEvent.class);

        String[] eventTypes = extractEventTypes(method, annotation);

        if (eventTypes.length > 0)
        {
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

        replay();

        ClassTransformation ct = createClassTransformation(EventHandlerTarget.class, logger);

        OnEvent annotation = ct.getMethodAnnotation(new TransformMethodSignature("handler"), OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), "fred");
        assertEquals(annotation.component(), "alpha");

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