1
2
3
4
5
6
7 package nl.tudelft.simulation.event;
8
9 import junit.framework.Assert;
10 import junit.framework.TestCase;
11
12 /***
13 * The test script for the Event class.
14 * <p>
15 * (c) copyright 2002-2005 <a href="http://www.simulation.tudelft.nl">Delft
16 * University of Technology </a>, the Netherlands. <br>
17 * See for project information <a
18 * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
19 * License of use: <a href="http://www.gnu.org/copyleft/lesser.html">Lesser
20 * General Public License (LGPL) </a>, no warranty.
21 *
22 * @author <a href="http://www.peter-jacobs.com/index.htm">Peter Jacobs </a>
23 * @version $Revision: 1.6 $ $Date: 2005/07/04 12:23:03 $
24 * @since 1.5
25 */
26 public class EventTest extends TestCase
27 {
28 /*** TEST_METHOD is the name of the test method */
29 public static final String TEST_METHOD = "test";
30
31 /***
32 * constructs a new EventIteratorTest.
33 */
34 public EventTest()
35 {
36 this(TEST_METHOD);
37 }
38
39 /***
40 * constructs a new EventIteratorTest
41 *
42 * @param method the name of the test method
43 */
44 public EventTest(final String method)
45 {
46 super(method);
47 }
48
49 /***
50 * tests the classes in the reference class.
51 */
52 public void test()
53 {
54 Object source = this;
55 EventType eventType = new EventType("TEST_TYPE");
56 Object content = new Object();
57
58
59 EventInterface event = new Event(eventType, source, content);
60 Assert.assertEquals(event.getContent(), content);
61 Assert.assertEquals(event.getSource(), source);
62 Assert.assertEquals(event.getType(), eventType);
63
64 }
65 }