Package org.apache.commons.beanutils

Examples of org.apache.commons.beanutils.FluentIntrospectionTestBean


     *
     * @return the bean instance used for testing
     * @throws Exception if an error occurs
     */
    private FluentIntrospectionTestBean clearWriteMethodRef() throws Exception {
        FluentIntrospectionTestBean bean = new FluentIntrospectionTestBean();
        PropertyDescriptor pd = pub.getPropertyDescriptor(bean, TEST_PROP);

        // simulate that the write method reference is freed
        pd.setWriteMethod(null);
        return bean;
View Full Code Here


    /**
     * Tests whether a lost write method is automatically recovered and can be invoked.
     */
    public void testWriteMethodRecover() throws Exception {
        FluentIntrospectionTestBean bean = clearWriteMethodRef();
        final String value = "Test value";
        pub.setProperty(bean, TEST_PROP, value);
        assertEquals("Property not set", value, bean.getFluentGetProperty());
    }
View Full Code Here

    /**
     * Tests whether a property is recognized as writable even if the reference to its
     * write method was freed.
     */
    public void testPropertyIsWritable() throws Exception {
        FluentIntrospectionTestBean bean = clearWriteMethodRef();
        assertTrue("Not writable", pub.isWriteable(bean, TEST_PROP));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.beanutils.FluentIntrospectionTestBean

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.