commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurizio Cucchiara <mcucchi...@apache.org>
Subject Re: [BeanUtils] Debugging BeanMap
Date Fri, 11 Nov 2011 01:06:17 GMT
I'm not sure this is what you are looking for, I'm assuming you are
trying to write into the student bean, I hope this will be useful (it
works on my side):

    @Test
    public void testBeanMap() throws Exception {
        Student student = new Student();
        BeanMap map = new BeanMap(student);
        assertNotNull(map);
        map.put("id", 1);
        map.put("course", new Course("course name"));
        assertEquals(1, student.getId());
        assertEquals("course name",student.getCourse().getName());
    }


Twitter     :http://www.twitter.com/m_cucchiara
G+          :https://plus.google.com/107903711540963855921
Linkedin    :http://www.linkedin.com/in/mauriziocucchiara

Maurizio Cucchiara



On 11 November 2011 01:51, Chris Pratt <thechrispratt@gmail.com> wrote:
> StringMapAdaptor

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message