Class ParametersTest

java.lang.Object
org.opentrafficsim.base.parameters.ParametersTest
All Implemented Interfaces:
org.opentrafficsim.base.parameters.constraint.ConstraintInterface

public class ParametersTest extends Object implements org.opentrafficsim.base.parameters.constraint.ConstraintInterface

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Field Summary

    Fields inherited from interface org.opentrafficsim.base.parameters.constraint.ConstraintInterface

    ATLEASTONE, NEGATIVE, NEGATIVEZERO, NONZERO, POSITIVE, POSITIVEZERO, UNITINTERVAL
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Checks whether default values are properly set, or not in case not given.
    final void
    Constructor tests.
    final void
    Parameter value custom constraint tests.
    final void
    Parameter value default range tests.
    final void
    Defaults tests.
    final void
    Tests equalizations.
    final void
    Tests the merging of parameter sets using setAll.
    final void
    Tests the set/reset mechanism.
    final void
    Test that exceptions are thrown when trying to use null values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ParametersTest

      public ParametersTest()
  • Method Details

    • defaultsTest

      @Test public final void defaultsTest()
      Defaults tests.
    • constructorTest

      @Test public final void constructorTest()
      Constructor tests.
    • defaultRangeTest

      @Test public final void defaultRangeTest()
      Parameter value default range tests.
    • customConstraintTest

      @Test public final void customConstraintTest()
      Parameter value custom constraint tests.
    • setResetTest

      @Test public final void setResetTest() throws org.opentrafficsim.base.parameters.ParameterException
      Tests the set/reset mechanism.
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - Should not be thrown, is for untested methods (in this test) that throw the exception.
    • equalizeTest

      @Test public final void equalizeTest() throws org.opentrafficsim.base.parameters.ParameterException
      Tests equalizations.
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - Should not be thrown, is for untested methods (in this test) that throw the exception.
    • testNullNotAllowed

      @Test public final void testNullNotAllowed()
      Test that exceptions are thrown when trying to use null values.
    • checkDefaultValues

      Checks whether default values are properly set, or not in case not given.
      Throws:
      SecurityException - Reflection.
      NoSuchMethodException - Reflection.
      InvocationTargetException - Reflection.
      IllegalArgumentException - Reflection.
      IllegalAccessException - Reflection.
      InstantiationException - Reflection.
    • mergeTest

      @Test public final void mergeTest() throws org.opentrafficsim.base.parameters.ParameterException
      Tests the merging of parameter sets using setAll.
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - parameter exception