Java tutorial
/** * Copyright 2008 Autentia Real Business Solutions S.L. * * This file is part of Autentia WUIJA. * * Autentia WUIJA is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, version 3 of the License. * * Autentia WUIJA is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Autentia WUIJA. If not, see <http://www.gnu.org/licenses/>. */ package com.autentia.tnt.faces.components.property; import java.lang.reflect.InvocationTargetException; import org.apache.commons.beanutils.PropertyUtils; import org.junit.Assert; import org.junit.Test; public class BigDecimalPropertyTest { @Test public void BigDecimalPropTest() { try { System.out.println(PropertyUtils.getPropertyType(BookMock.class, "price")); } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { // TODO Auto-generated catch block e.printStackTrace(); } final Property[] properties = PropertyFactory.build(BookMock.class, false, "price"); Assert.assertEquals("com.autentia.tnt.faces.components.property.BigDecimalProperty", properties[0].getClass().getName()); } }