Package org.djunits.formatter
Class SiPrefixFormatTest
java.lang.Object
org.djunits.formatter.SiPrefixFormatTest
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final voidreset()Setup correct locale for test.(package private) final voidsetup()Setup correct locale for test.voidTest allowExponents12 setting for KILO SI prefixes.voidTest allowExponents12 setting for PER_KILO SI prefixes.voidTest allowExponents12 setting for PER_UNIT SI prefixes.voidTest allowExponents12 setting for UNIT SI prefixes.voidTest exception when min > max inQuantityFormat.setAutoSiPrefix()method.voidTestQuantityFormat.setAutoSiPrefix()for a kilo quantity.voidTestQuantityFormat.setAutoSiPrefix()for a "per" quantity.voidTestQuantityFormat.setAutoSiPrefix()for a "per kilo" quantity.voidTestQuantityFormat.setAutoSiPrefix()for a unit quantity.voidTestQuantityFormat.setAutoSiPrefix()for a unit quantity, and a number that is not a multiple of 1.voidTestQuantityFormat.setAutoSiPrefix()for a unit quantity, and a number that is not a multiple of 1.voidTest extreme settings forQuantityFormat.setAutoSiPrefix()method.
-
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()TestQuantityFormat.setAutoSiPrefix()for a unit quantity. -
testAutoSiPrefixUnit95
@Test public void testAutoSiPrefixUnit95()TestQuantityFormat.setAutoSiPrefix()for a unit quantity, and a number that is not a multiple of 1. -
testAutoSiPrefixUnitM123
@Test public void testAutoSiPrefixUnitM123()TestQuantityFormat.setAutoSiPrefix()for a unit quantity, and a number that is not a multiple of 1. -
testAutoSiPrefixKilo
@Test public void testAutoSiPrefixKilo()TestQuantityFormat.setAutoSiPrefix()for a kilo quantity. -
testAutoSiPrefixPer
@Test public void testAutoSiPrefixPer()TestQuantityFormat.setAutoSiPrefix()for a "per" quantity. -
testAutoSiPrefixPerKilo
@Test public void testAutoSiPrefixPerKilo()TestQuantityFormat.setAutoSiPrefix()for a "per kilo" quantity. -
testAutoSiException
@Test public void testAutoSiException()Test exception when min > max inQuantityFormat.setAutoSiPrefix()method. -
testExtremeValues
@Test public void testExtremeValues()Test extreme settings forQuantityFormat.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.
-