Class SiPrefixFormatTest

java.lang.Object
org.djunits.formatter.SiPrefixFormatTest

public class SiPrefixFormatTest extends Object
Tests all QuantityFormat settings that are related to QuantityFormat.setAutoSiPrefix().

Copyright (c) 2026-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djunits.org. The DJUNITS project is distributed under a three-clause BSD-style license.

Author:
Alexander Verbraeck
  • Constructor Details

    • SiPrefixFormatTest

      public SiPrefixFormatTest()
  • Method Details

    • setup

      @BeforeEach final void setup()
      Setup correct locale for test.
    • reset

      @AfterEach final void reset()
      Setup correct locale for test.
    • testAutoSiPrefixUnit

      @Test public void testAutoSiPrefixUnit()
      Test QuantityFormat.setAutoSiPrefix() for a unit quantity.
    • testAutoSiPrefixUnit95

      @Test public void testAutoSiPrefixUnit95()
      Test QuantityFormat.setAutoSiPrefix() for a unit quantity, and a number that is not a multiple of 1.
    • testAutoSiPrefixUnitM123

      @Test public void testAutoSiPrefixUnitM123()
      Test QuantityFormat.setAutoSiPrefix() for a unit quantity, and a number that is not a multiple of 1.
    • testAutoSiPrefixKilo

      @Test public void testAutoSiPrefixKilo()
      Test QuantityFormat.setAutoSiPrefix() for a kilo quantity.
    • testAutoSiPrefixPer

      @Test public void testAutoSiPrefixPer()
      Test QuantityFormat.setAutoSiPrefix() for a "per" quantity.
    • testAutoSiPrefixPerKilo

      @Test public void testAutoSiPrefixPerKilo()
      Test QuantityFormat.setAutoSiPrefix() for a "per kilo" quantity.
    • testAutoSiException

      @Test public void testAutoSiException()
      Test exception when min > max in QuantityFormat.setAutoSiPrefix() method.
    • testExtremeValues

      @Test public void testExtremeValues()
      Test extreme settings for QuantityFormat.setAutoSiPrefix() method.
    • testAllowExponents12Unit

      @Test public void testAllowExponents12Unit()
      Test allowExponents12 setting for UNIT SI prefixes.
    • testAllowExponents12Kilo

      @Test public void testAllowExponents12Kilo()
      Test allowExponents12 setting for KILO SI prefixes.
    • testAllowExponents12PerUnit

      @Test public void testAllowExponents12PerUnit()
      Test allowExponents12 setting for PER_UNIT SI prefixes.
    • testAllowExponents12PerKilo

      @Test public void testAllowExponents12PerKilo()
      Test allowExponents12 setting for PER_KILO SI prefixes.