1 package org.picocontainer.defaults; 2 3 import junit.framework.TestCase; 4 import org.picocontainer.testmodel.CoupleBean; 5 6 12 public class BeanPropertyComponentAdapterTestCase extends TestCase { 13 public void testBeanPropertyComponentAdapterCanUsePropertyEditors() throws ClassNotFoundException { 14 Object c = BeanPropertyComponentAdapter.convert(CoupleBean.class.getName(), "a's name:Camilla;b's name:Charles;", this.getClass().getClassLoader()); 15 assertNotNull(c); 16 assertTrue(c instanceof CoupleBean); 17 assertEquals("Camilla", ((CoupleBean) c).getPersonA().getName()); 18 assertEquals("Charles", ((CoupleBean) c).getPersonB().getName()); 19 } 20 21 } 22 | Popular Tags |