Class UnitSerializationTest

java.lang.Object
org.djutils.serialization.AbstractSerializationTest
org.djutils.serialization.UnitSerializationTest

public class UnitSerializationTest extends AbstractSerializationTest
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 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.ValueRuntimeException
      Test encoding and decoding of strongly typed quantities (DJUNITS).
      Throws:
      SerializationException - when that happens uncaught, this test has failed
      org.djunits.value.ValueRuntimeException - when that happens uncaught, this test has failed
    • testDJunitsErrors

      @Test public void testDJunitsErrors() throws SerializationException, org.djunits.value.ValueRuntimeException
      Test encoding and decoding of strongly typed quantities (DJUNITS).
      Throws:
      SerializationException - when that happens uncaught, this test has failed
      org.djunits.value.ValueRuntimeException - when that happens uncaught, this test has failed
    • testSerializationUnits

      @Test public void testSerializationUnits() throws SerializationException, org.djunits.value.ValueRuntimeException
      Test stored information about djunits SerializationUnits.
      Throws:
      SerializationException - when that happens uncaught, this test has failed
      org.djunits.value.ValueRuntimeException - when that happens uncaught, this test has failed
    • testDJunitDisplayTypes

      @Test public void testDJunitDisplayTypes() throws SerializationException, org.djunits.value.ValueRuntimeException
      Test stored information about djunits display types.
      Throws:
      SerializationException - when that happens uncaught, this test has failed
      org.djunits.value.ValueRuntimeException - when that happens uncaught, this test has failed
    • testDoubleUnitColumnMatrix

      @Test public void testDoubleUnitColumnMatrix() throws org.djunits.value.ValueRuntimeException, SerializationException
      Test 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 failed
      SerializationException - if that happens uncaught; this test has failed
    • testFloatUnitColumnMatrix

      @Test public void testFloatUnitColumnMatrix() throws org.djunits.value.ValueRuntimeException, SerializationException
      Test 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 failed
      SerializationException - if that happens uncaught; this test has failed
    • testUnitColumnMatrixExceptions

      @Test public void testUnitColumnMatrixExceptions()
      Test exceptions with instantiation of unit column matrices.