List of usage examples for org.apache.commons.beanutils Person setAge
public void setAge(int age)
From source file:org.seasar.struts.bean.SuppressPropertyUtilsBeanTest.java
public void testGetProperty() throws Exception { List classes = new ArrayList(); classes.add(FullName.class); PropertyUtilsBean propertyUtils = new SuppressPropertyUtilsBean(classes); Person person = new Person(); person.getFullName().setFirstName("aaa"); person.getFullName().setLastName("bbb"); person.getAddress().setStreet("ccc"); person.setAge("20"); try {/*from www .j a v a 2 s .c om*/ propertyUtils.getProperty(person, "fullName.firstName"); } catch (NoSuchMethodException expected) { } try { propertyUtils.getProperty(person, "fullName.lastName"); } catch (NoSuchMethodException expected) { } assertEquals("ccc", propertyUtils.getProperty(person, "address.street")); assertEquals("20", propertyUtils.getProperty(person, "age")); }