1
2
3
4
5
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
55 Assert.assertEquals(ClassUtil.getClass(null).length, 0);
56 Assert.assertEquals(ClassUtil.getClass(new Object[] { "Peter" })[0],
57 String.class);
58 }
59 }