mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/utils/TestReflectionsUtil.java
@Test
    public void testRetrieveGetMethod() throws ReflectionsUtilException, IllegalArgumentException, 
        IllegalAccessException, InvocationTargetException
    {
        Method methodInteger = ReflectionsUtil.retrieveGetMethod(m_Obj, "TestInteger", int.class);
        
        assertThat(methodInteger, notNullValue());
        assertThat((Integer)methodInteger.invoke(m_Obj), is(1));
        
        Method methodBooleanType = ReflectionsUtil.retrieveGetMethod(m_Obj, "TestBooleanType", boolean.class);
        assertThat(methodBooleanType, notNullValue());
        assertThat((Boolean)methodBooleanType.invoke(m_Obj), is(false));
        
        Method methodBooleanObject = ReflectionsUtil.retrieveGetMethod(m_Obj, "TestBooleanObject", Boolean.class);
        assertThat(methodBooleanObject, notNullValue());
        assertThat((Boolean)methodBooleanObject.invoke(m_Obj), is(true));
    }
/**
     * Verify can retrieve the correct get methods on an object.
     */
Verify can retrieve the correct get methods on an object.
Verify can retrieve the correct get methods on an object .
@Test
    public void testRetrieveGetMethod() throws ReflectionsUtilException, IllegalArgumentException, 
        IllegalAccessException, InvocationTargetException
    {
        Method methodInteger = ReflectionsUtil.retrieveGetMethod(m_Obj, "TestInteger", int.class);
        assertThat(methodInteger, notNullValue());
        assertThat((Integer)methodInteger.invoke(m_Obj), is(1));
        Method methodBooleanType = ReflectionsUtil.retrieveGetMethod(m_Obj, "TestBooleanType", boolean.class);
        assertThat(methodBooleanType, notNullValue());
        assertThat((Boolean)methodBooleanType.invoke(m_Obj), is(false));
        Method methodBooleanObject = ReflectionsUtil.retrieveGetMethod(m_Obj, "TestBooleanObject", Boolean.class);
        assertThat(methodBooleanObject, notNullValue());
        assertThat((Boolean)methodBooleanObject.invoke(m_Obj), is(true));
    }
@ Test public void testRetrieveGetMethod ( ) throws ReflectionsUtilException , IllegalArgumentException , IllegalAccessException , InvocationTargetException { Method methodInteger = ReflectionsUtil . retrieveGetMethod ( m_Obj , "TestInteger" , int . class ) ; assertThat ( methodInteger , notNullValue ( ) ) ; assertThat ( ( Integer ) methodInteger . invoke ( m_Obj ) , is ( 1 ) ) ; Method methodBooleanType = ReflectionsUtil . retrieveGetMethod ( m_Obj , "TestBooleanType" , boolean . class ) ; assertThat ( methodBooleanType , notNullValue ( ) ) ; assertThat ( ( Boolean ) methodBooleanType . invoke ( m_Obj ) , is ( false ) ) ; Method methodBooleanObject = ReflectionsUtil . retrieveGetMethod ( m_Obj , "TestBooleanObject" , Boolean . class ) ; assertThat ( methodBooleanObject , notNullValue ( ) ) ; assertThat ( ( Boolean ) methodBooleanObject . invoke ( m_Obj ) , is ( true ) ) ; }
Verify can retrieve the correct get methods on an object.
Verify can retrieve the correct get methods on an object .