Package org.djunits.unit.units
Class AbstractLinearUnitTest<U extends UnitInterface<U,?>>
java.lang.Object
org.djunits.unit.units.AbstractUnitTest<U>
org.djunits.unit.units.AbstractLinearUnitTest<U>
- Type Parameters:
U- Make the test specific for this sub class of Unit
- Direct Known Subclasses:
AbsorbedDoseUnitTest,AccelerationUnitTest,AmountOfSubstanceUnitTest,AngleUnitTest,ArealObjectDensityUnitTest,AreaUnitTest,CatalyticActivityUnitTest,DensityUnitTest,DimensionlessUnitTest,DurationUnitTest,ElectricalCapacitanceUnitTest,ElectricalConductanceUnitTest,ElectricalInductanceUnitTest,ElectricalResistanceUnitTest,ElectricChargeUnitTest,ElectricCurrentUnitTest,ElectricPotentialUnitTest,EnergyUnitTest,EquivalentDoseUnitTest,FlowMassUnitTest,FlowVolumeUnitTest,ForceUnitTest,FrequencyUnitTest,IlluminanceUnitTest,LengthUnitTest,LinearDensityUnitTest,LinearObjectDensityUnitTest,LuminousFluxUnitTest,LuminousIntensityUnitTest,MagneticFluxDensityUnitTest,MagneticFluxUnitTest,MassUnitTest,PowerUnitTest,PressureUnitTest,RadioActivityUnitTest,SolidAngleUnitTest,SpeedUnitTest,TemperatureUnitTest,TorqueUnitTest,VolumetricObjectDensityUnitTest,VolumeUnitTest
public abstract class AbstractLinearUnitTest<U extends UnitInterface<U,?>>
extends AbstractUnitTest<U>
Test for AbstractLinearUnit.
Copyright (c) 2025-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 TypeMethodDescriptionprotected final voidcheckUnitRatioNameAndAbbreviation(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.final doublegetMultiplicationFactorTo(U fromUnit, U toUnit) Methods inherited from class org.djunits.unit.units.AbstractUnitTest
checkUnitNameAndAbbreviation
-
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 checkexpectedRatio- expected ratioprecision- precision of verificationexpectedName- expected name in the resourcesexpectedAbbreviation- expected abbreviation in the resources
-
getMultiplicationFactorTo
- Parameters:
fromUnit- the unit to convert fromtoUnit- the unit to convert to- Returns:
- multiplication factor to convert a value from fromUnit to toUnit
-