1   /*
2    * @(#) MonitorTest.java Sep 28, 2004 Copyright (c) 2002-2005 Delft University
3    * of Technology Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights
4    * reserved. This software is proprietary information of Delft University of
5    * Technology The code is published under the Lesser General Public License
6    */
7   package nl.tudelft.simulation.language.reflection;
8   
9   import junit.framework.Assert;
10  import junit.framework.TestCase;
11  
12  /***
13   * The JUNIT Test for the <code>ClassUtilTest</code>.
14   * <p>
15   * (c) copyright 2002-2005 <a href="http://www.simulation.tudelft.nl">Delft
16   * University of Technology </a>, the Netherlands.
17   * <p>
18   * See for project information <a
19   * href="http://www.simulation.tudelft.nl/dsol/language">www.simulation.tudelft.nl/language
20   * </a> <br>
21   * License of use: <a href="http://www.gnu.org/copyleft/lesser.html">Lesser
22   * General Public License (LGPL) </a>, no warranty
23   * 
24   * @author <a href="http://www.peter-jacobs.com/index.htm">Peter Jacobs </a>
25   * @version 1.2 Sep 28, 2004
26   * @since 1.5
27   */
28  public class ClassUtilTest extends TestCase
29  {
30  
31      /***
32       * constructs a new ClassUtilTest
33       */
34      public ClassUtilTest()
35      {
36          this("test");
37      }
38  
39      /***
40       * constructs a new ClassUtilTest
41       * 
42       * @param arg0
43       */
44      public ClassUtilTest(String arg0)
45      {
46          super(arg0);
47      }
48  
49      /***
50       * tests the ClassUtil
51       */
52      public void test()
53      {
54          // the getClass method
55          Assert.assertEquals(ClassUtil.getClass(null).length, 0);
56          Assert.assertEquals(ClassUtil.getClass(new Object[] { "Peter" })[0],
57                  String.class);
58      }
59  }