KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > picocontainer > defaults > BeanPropertyComponentAdapterTestCase


1 package org.picocontainer.defaults;
2
3 import junit.framework.TestCase;
4 import org.picocontainer.testmodel.CoupleBean;
5
6 /**
7  *
8  * @author greg
9  * @author $Author: $ (last edit)
10  * @version $Revision: $
11  */

12 public class BeanPropertyComponentAdapterTestCase extends TestCase {
13     public void testBeanPropertyComponentAdapterCanUsePropertyEditors() throws ClassNotFoundException JavaDoc {
14         Object JavaDoc 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