[ 
https://issues.apache.org/jira/browse/TAPESTRY-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489587
 ] 

Jun Tsai commented on TAPESTRY-1410:
------------------------------------

The new test is fail.


public class GenericsMethodSignatureImplTest extends Assert{
        public static abstract class BaseTest<T> {

        }

        public static abstract class MyTest<T, E> extends BaseTest<T> {
                public abstract E getRelativeObject();
                public abstract void setRelativeObject(E e);

        }

        @Test
        public void test_generic() {
                Class testClass = MyTest.class;
                Method[] methods = testClass.getMethods();
                for (Method method : methods) {
                        MethodSignatureImpl msi = new 
GenericsMethodSignatureImpl(
                                        testClass, method);
                        if(method.getName().equals("getRelativeObject")){
                                
assertEquals(msi.getReturnType(),"java.lang.Object"); //get return type shuld 
be object
                        }
                }
        }

}

> fail to test GenericsMethodSignatureImpl class.
> -----------------------------------------------
>
>                 Key: TAPESTRY-1410
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1410
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 4.1.2
>         Environment: jdk1.5
>            Reporter: Jun Tsai
>         Assigned To: Jesse Kuhnert
>            Priority: Blocker
>             Fix For: 4.1.2
>
>
> fail to test GenericsMethodSignatureImpl class.
> public class GenericsMethodSignatureImplTest {
>       public static abstract class BaseTest<T>{
>               
>       }
>       public static abstract class MyTest<T,E>extends BaseTest<T>   {
>               public abstract E getRelativeObject();
>               public abstract void setRelativeObject(E e);
>               
>       }
>       
>       @Test
>       public void test_generic() {
>               Class testClass=MyTest.class;
>               Method[] methods = testClass.getMethods();
>               for (Method method : methods) {
>                       MethodSignatureImpl msi = new 
> GenericsMethodSignatureImpl(testClass,method);
>                       msi.hashCode();
>               }
>       }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to