Class ParametersTest
java.lang.Object
org.opentrafficsim.base.parameters.ParametersTest
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks whether default values are properly set, or not in case not given.voidTests the claimed set mechanism.voidConstructor tests.voidParameter value custom constraint tests.voidParameter value default range tests.voidDefaults tests.voidTests equalizations.voidTests the merging of parameter sets using setAll.voidTests the set/reset mechanism.voidTest that exceptions are thrown when trying to use null values.
-
Method Details
-
defaultsTest
Defaults tests. -
constructorTest
Constructor tests. -
defaultRangeTest
Parameter value default range tests. -
customConstraintTest
Parameter value custom constraint tests. -
claimTest
Tests the claimed set mechanism.- Throws:
ParameterException- should not be thrown, is for untested methods (in this test) that throw the exception
-
setResetTest
Tests the set/reset mechanism.- Throws:
ParameterException- should not be thrown, is for untested methods (in this test) that throw the exception
-
equalizeTest
Tests equalizations.- Throws:
ParameterException- Should not be thrown, is for untested methods (in this test) that throw the exception.
-
testNullNotAllowed
Test that exceptions are thrown when trying to use null values. -
checkDefaultValues
@Test public void checkDefaultValues() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityExceptionChecks 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
Tests the merging of parameter sets using setAll.- Throws:
ParameterException- parameter exception
-