Package org.djutils.event
Class EventPubSubTest
java.lang.Object
org.djutils.event.EventPubSubTest
Test the EventProducer and EventListener.
 
Copyright (c) 2002-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html. This class was originally part of the DSOL project, see https://simulation.tudelft.nl/dsol/manual.
- Author:
 - Alexander Verbraeck
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected static classprotected static classEventPubSubTest.TestTimedEventListener<C extends Comparable<C>>TimedEventListener. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidTest the EventProducer for a weak reference that is removed by the garbage collector.voidTest the EventProducer and EventListener.voidTest the EventProducer for strong and weak references, and for position information.voidTest the EventProducer and EventListener for verified / unverified events.voidTest the EventProducer and EventListener for two events with the same name being equal...voidTest the EventProducer and EventListener for TimedEvents.voidTest the EventProducer and EventListener for verified / unverified timed events. 
- 
Constructor Details
- 
EventPubSubTest
public EventPubSubTest() 
 - 
 - 
Method Details
- 
testEventPubSub
@Test public void testEventPubSub()Test the EventProducer and EventListener. - 
testEventVerificationPubSub
@Test public void testEventVerificationPubSub()Test the EventProducer and EventListener for verified / unverified events. - 
testTimedEventPubSub
@Test public void testTimedEventPubSub()Test the EventProducer and EventListener for TimedEvents. - 
testTimedEventVerificationPubSub
@Test public void testTimedEventVerificationPubSub()Test the EventProducer and EventListener for verified / unverified timed events. - 
testIllegalEventProducer
@Test public void testIllegalEventProducer()Test the EventProducer and EventListener for two events with the same name being equal... - 
testEventStrongWeakPos
@Test public void testEventStrongWeakPos() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityExceptionTest the EventProducer for strong and weak references, and for position information.- Throws:
 SecurityException- on error retrieving listener mapNoSuchFieldException- on error retrieving listener mapIllegalAccessException- on error retrieving listener mapIllegalArgumentException- on error retrieving listener map
 - 
testEventProducerWeakRemoval
@Test public void testEventProducerWeakRemoval() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityExceptionTest the EventProducer for a weak reference that is removed by the garbage collector.- Throws:
 SecurityException- on error retrieving listener mapNoSuchFieldException- on error retrieving listener mapIllegalAccessException- on error retrieving listener mapIllegalArgumentException- on error retrieving listener map
 
 -