Package org.djutils.serialization
Class UnitSerializationTest
java.lang.Object
org.djutils.serialization.AbstractSerializationTest
org.djutils.serialization.UnitSerializationTest
UnitSerializationTest tests the encoding / decoding of values (Scalar, Vector, Matrix) with units.
Copyright (c) 2023-2025 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.
- Author:
- Alexander Verbraeck
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Test stored information about djunits display types.void
Test encoding and decoding of strongly typed quantities (DJUNITS).void
Test encoding and decoding of strongly typed quantities (DJUNITS).void
Test a double column matrix, where each column can contain a different quantity and/or display unit.void
Test a float column matrix, where each column can contain a different quantity and/or display unit.void
Test stored information about djunits SerializationUnits.void
Test exceptions with instantiation of unit column matrices.void
Test the UnitType class.Methods inherited from class org.djutils.serialization.AbstractSerializationTest
compare, deepEquals0, makePrimitive
-
Constructor Details
-
UnitSerializationTest
public UnitSerializationTest()
-
-
Method Details
-
testUnitType
@Test public void testUnitType()Test the UnitType class. -
testDJunits
@Test public void testDJunits() throws SerializationException, org.djunits.value.ValueRuntimeExceptionTest encoding and decoding of strongly typed quantities (DJUNITS).- Throws:
SerializationException
- when that happens uncaught, this test has failedorg.djunits.value.ValueRuntimeException
- when that happens uncaught, this test has failed
-
testDJunitsErrors
@Test public void testDJunitsErrors() throws SerializationException, org.djunits.value.ValueRuntimeExceptionTest encoding and decoding of strongly typed quantities (DJUNITS).- Throws:
SerializationException
- when that happens uncaught, this test has failedorg.djunits.value.ValueRuntimeException
- when that happens uncaught, this test has failed
-
testSerializationUnits
@Test public void testSerializationUnits() throws SerializationException, org.djunits.value.ValueRuntimeExceptionTest stored information about djunits SerializationUnits.- Throws:
SerializationException
- when that happens uncaught, this test has failedorg.djunits.value.ValueRuntimeException
- when that happens uncaught, this test has failed
-
testDJunitDisplayTypes
@Test public void testDJunitDisplayTypes() throws SerializationException, org.djunits.value.ValueRuntimeExceptionTest stored information about djunits display types.- Throws:
SerializationException
- when that happens uncaught, this test has failedorg.djunits.value.ValueRuntimeException
- when that happens uncaught, this test has failed
-
testDoubleUnitColumnMatrix
@Test public void testDoubleUnitColumnMatrix() throws org.djunits.value.ValueRuntimeException, SerializationExceptionTest a double column matrix, where each column can contain a different quantity and/or display unit.- Throws:
org.djunits.value.ValueRuntimeException
- if that happens uncaught; this test has failedSerializationException
- if that happens uncaught; this test has failed
-
testFloatUnitColumnMatrix
@Test public void testFloatUnitColumnMatrix() throws org.djunits.value.ValueRuntimeException, SerializationExceptionTest a float column matrix, where each column can contain a different quantity and/or display unit.- Throws:
org.djunits.value.ValueRuntimeException
- if that happens uncaught; this test has failedSerializationException
- if that happens uncaught; this test has failed
-
testUnitColumnMatrixExceptions
@Test public void testUnitColumnMatrixExceptions()Test exceptions with instantiation of unit column matrices.
-