Package org.djunits.value.vdouble.vector
Class DoubleVectorConstructorsTest
java.lang.Object
org.djunits.value.vdouble.vector.DoubleVectorConstructorsTest
public class DoubleVectorConstructorsTest extends Object
Test constructors of DoubleVector.
-
Constructor Summary
Constructors Constructor Description DoubleVectorConstructorsTest()
-
Method Summary
Modifier and Type Method Description void
compareSum(double[] left, double[] right, double[] sum)
Check that two arrays and a sum array match.void
compareValues(double[] reference, double[] got)
Compare two double arrays.void
compareValuesWithScale(org.djunits.unit.scale.Scale scale, double[] reference, double[] got)
Compare two double arrays with factor and offset (derived from a scale).void
exceptionsTest()
Test all the exception that the constructors may throw.void
instantiateListTest()
Test constructors of array, list, map with the AbsoluteTemperature unit.void
instantiatorTest()
Test the constructors of DoubleVector.void
operationTest()
Test the plus and similar methods.void
parallelTest()
Test that parallelized operations work.void
siVectorTest()
Test the SIVector class.<U extends org.djunits.unit.Unit<U>>
voidtestAsMost()
Test most "asXX" methods.<U extends org.djunits.unit.Unit<U>>
voidtestAsRemaining()
Test the "asXX" methods of the remaining classes.<U extends org.djunits.unit.Unit<U>>
voidtestAsUnit()
Test theas
method of the SIVector class.
-
Constructor Details
-
DoubleVectorConstructorsTest
public DoubleVectorConstructorsTest()
-
-
Method Details
-
instantiatorTest
public void instantiatorTest() throws ClassNotFoundException, NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetExceptionTest the constructors of DoubleVector.- Throws:
ClassNotFoundException
- if that happens uncaught; this test has failedSecurityException
- if that happens uncaught; this test has failedNoSuchMethodException
- if that happens uncaught; this test has failedInvocationTargetException
- if that happens uncaught; this test has failedIllegalArgumentException
- if that happens uncaught; this test has failedIllegalAccessException
- if that happens uncaught; this test has failedInstantiationException
- if that happens uncaught; this test has failed
-
instantiateListTest
public void instantiateListTest()Test constructors of array, list, map with the AbsoluteTemperature unit. -
siVectorTest
public void siVectorTest() throws org.djunits.value.ValueRuntimeException, org.djunits.unit.util.UnitException, ClassNotFoundExceptionTest the SIVector class.- Throws:
org.djunits.unit.util.UnitException
- if that happens uncaught; this test has failedorg.djunits.value.ValueRuntimeException
- if that happens uncaught; this test has failedClassNotFoundException
- if that happens uncaught; this test has failed
-
exceptionsTest
public void exceptionsTest() throws org.djunits.value.ValueRuntimeException, org.djunits.unit.util.UnitExceptionTest all the exception that the constructors may throw.- Throws:
org.djunits.unit.util.UnitException
- when that happens uncaught; this test has failedorg.djunits.value.ValueRuntimeException
- when that happens uncaught; this test has failed
-
parallelTest
public void parallelTest()Test that parallelized operations work. -
testAsMost
public <U extends org.djunits.unit.Unit<U>> void testAsMost() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, org.djunits.unit.util.UnitExceptionTest most "asXX" methods.- Type Parameters:
U
- the unit type- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorClassNotFoundException
- on errororg.djunits.unit.util.UnitException
- on error
-
testAsRemaining
public <U extends org.djunits.unit.Unit<U>> void testAsRemaining() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, org.djunits.unit.util.UnitExceptionTest the "asXX" methods of the remaining classes.- Type Parameters:
U
- the unit type- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorClassNotFoundException
- on errororg.djunits.unit.util.UnitException
- on error
-
testAsUnit
public <U extends org.djunits.unit.Unit<U>> void testAsUnit() throws ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, org.djunits.unit.util.UnitExceptionTest theas
method of the SIVector class.- Type Parameters:
U
- the unit type- Throws:
SecurityException
- on errorNoSuchMethodException
- on errorInvocationTargetException
- on errorIllegalArgumentException
- on errorIllegalAccessException
- on errorClassNotFoundException
- on errororg.djunits.unit.util.UnitException
- on error
-
operationTest
public void operationTest()Test the plus and similar methods. -
compareSum
public void compareSum(double[] left, double[] right, double[] sum)Check that two arrays and a sum array match.- Parameters:
left
- double[]; the left arrayright
- double[]; the right arraysum
- double[]; the sum array
-
compareValues
public void compareValues(double[] reference, double[] got)Compare two double arrays.- Parameters:
reference
- double[]; the reference valuesgot
- double[] the values that should match the reference values
-
compareValuesWithScale
public void compareValuesWithScale(org.djunits.unit.scale.Scale scale, double[] reference, double[] got)Compare two double arrays with factor and offset (derived from a scale).- Parameters:
scale
- Scale; the scalereference
- double[]; the reference valuesgot
- double[] the values that should match the reference values
-