1   /*
2    * BeanUtilsTest.java
3    *
4    * Created on 22 Декабрь 2005 г., 16:52
5    *
6    * To change this template, choose Tools | Options and locate the template under
7    * the Source Creation and Management node. Right-click the template and choose
8    * Open. You can then make changes to the template in the Source Editor.
9    */
10  
11  package org.weda;
12  
13  import java.util.Date;
14  import org.apache.commons.beanutils.locale.LocaleConvertUtils;
15  import tim.test.LogableTestCase;
16  
17  /**
18   *
19   * @author tim
20   */
21  public class BeanUtilsTest extends LogableTestCase {
22      
23      public BeanUtilsTest(String name) throws Exception {
24          super(name);
25      }
26      
27      public void test_ConvertorUtils() throws Exception {
28          Object date=LocaleConvertUtils.convert("01-01-2005", Date.class, "dd-MM-yyyy");
29          log.debug("date class: "+date.getClass().getName());
30          log.debug("date: "+date);
31          Object num=LocaleConvertUtils.convert("35,1234", Double.class);
32          log.debug("num class: "+num.getClass().getName());
33          log.debug("num: "+num);
34      }
35      
36  }