package nl.tudelft.simulation.language.reflection; import junit.framework.TestCase; /** * The JUNIT Test for the ClassUtilTest. *

* Copyright (c) 2002-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights * reserved. See for project information * https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can * be found at * https://simulation.tudelft.nl/dsol/3.0/license.html. *

* @author Peter Jacobs * @since 1.5 */ public class ClassUtilTest extends TestCase { /** * constructs a new ClassUtilTest. */ public ClassUtilTest() { this("test"); } /** * constructs a new ClassUtilTest. * @param arg0 */ public ClassUtilTest(String arg0) { super(arg0); } /** * tests the ClassUtil */ public void test() { // the getClass method TestCase.assertEquals(ClassUtil.getClass(null).length, 0); TestCase.assertEquals(ClassUtil.getClass(new Object[]{"Peter"})[0], String.class); } }