Class ParametersTest

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

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

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

$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version 7 apr. 2016
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
    ParametersTest()  
  • Method Summary

    Modifier and Type Method Description
    void checkDefaultValues()
    Checks whether default values are properly set, or not in case not given.
    void constructorTest()
    Constructor tests.
    void customConstraintTest()
    Parameter value custom constraint tests.
    void defaultRangeTest()
    Parameter value default range tests.
    void defaultsTest()
    Defaults tests.
    void equalizeTest()
    Tests equalizations.
    void mergeTest()
    Tests the merging of parameter sets using setAll.
    void setResetTest()
    Tests the set/reset mechanism.
    void testNullNotAllowed()
    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

  • Method Details

    • defaultsTest

      public final void defaultsTest()
      Defaults tests.
    • constructorTest

      public final void constructorTest()
      Constructor tests.
    • defaultRangeTest

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

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

      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

      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

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

      public final void checkDefaultValues() throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException
      Checks whether default values are properly set, or not in case not given.
      Throws:
      java.lang.SecurityException - Reflection.
      java.lang.NoSuchMethodException - Reflection.
      java.lang.reflect.InvocationTargetException - Reflection.
      java.lang.IllegalArgumentException - Reflection.
      java.lang.IllegalAccessException - Reflection.
      java.lang.InstantiationException - Reflection.
    • mergeTest

      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