Class AbstractLinearUnitTest<U extends org.djunits.unit.Unit<U>>

java.lang.Object
org.djunits.unit.AbstractUnitTest<U>
org.djunits.unit.AbstractLinearUnitTest<U>
Type Parameters:
U - Make the test specific for this sub class of Unit
Direct Known Subclasses:
AbsorbedDoseUnitTest, AccelerationUnitTest, AmountOfSubstanceUnitTest, AngleUnitTest, AreaUnitTest, CatalyticActivityUnitTest, DensityUnitTest, DimensionlessUnitTest, DurationUnitTest, ElectricalCapacitanceUnitTest, ElectricalChargeUnitTest, ElectricalConductanceUnitTest, ElectricalCurrentUnitTest, ElectricalInductanceUnitTest, ElectricalPotentialUnitTest, ElectricalResistanceUnitTest, EnergyUnitTest, EquivalentDoseUnitTest, FlowMassUnitTest, FlowVolumeUnitTest, ForceUnitTest, FrequencyUnitTest, IlluminanceUnitTest, LengthUnitTest, LinearDensityUnitTest, LuminousFluxUnitTest, LuminousIntensityUnitTest, MagneticFluxDensityUnitTest, MagneticFluxUnitTest, MassUnitTest, PowerUnitTest, PressureUnitTest, SolidAngleUnitTest, SpeedUnitTest, TorqueUnitTest, VolumeUnitTest

public abstract class AbstractLinearUnitTest<U extends org.djunits.unit.Unit<U>> extends AbstractUnitTest<U>

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.

Author:
Peter Knoppers
  • Constructor Details

    • AbstractLinearUnitTest

      public AbstractLinearUnitTest()
  • Method Details

    • checkUnitRatioNameAndAbbreviation

      protected final void checkUnitRatioNameAndAbbreviation(U u, double expectedRatio, double precision, String expectedName, String expectedAbbreviation)
      Verify one length conversion factor to standard unit and the localization of the name and abbreviation.
      Parameters:
      u - Unit to check
      expectedRatio - Double; expected ratio
      precision - Double; precision of verification
      expectedName - String; expected name in the resources
      expectedAbbreviation - String; expected abbreviation in the resources
    • getMultiplicationFactorTo

      public final double getMultiplicationFactorTo(U fromUnit, U toUnit)
      Parameters:
      fromUnit - U; the unit to convert from
      toUnit - U; the unit to convert to
      Returns:
      multiplication factor to convert a value from fromUnit to toUnit