Class EventPubSubTest

java.lang.Object
org.djutils.event.EventPubSubTest

public class EventPubSubTest extends Object
Test the EventProducer and EventListener.

Copyright (c) 2002-2024 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
  • 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, SecurityException
      Test the EventProducer for strong and weak references, and for position information.
      Throws:
      SecurityException - on error retrieving listener map
      NoSuchFieldException - on error retrieving listener map
      IllegalAccessException - on error retrieving listener map
      IllegalArgumentException - on error retrieving listener map
    • testEventProducerWeakRemoval

      @Test public void testEventProducerWeakRemoval() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException
      Test the EventProducer for a weak reference that is removed by the garbage collector.
      Throws:
      SecurityException - on error retrieving listener map
      NoSuchFieldException - on error retrieving listener map
      IllegalAccessException - on error retrieving listener map
      IllegalArgumentException - on error retrieving listener map