Package org.djunits.unit
Class AbstractLinearUnitTest<U extends 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
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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.final double
getMultiplicationFactorTo
(U fromUnit, U toUnit) Methods inherited from class org.djunits.unit.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
- Double; expected ratioprecision
- Double; precision of verificationexpectedName
- String; expected name in the resourcesexpectedAbbreviation
- String; expected abbreviation in the resources
-
getMultiplicationFactorTo
- Parameters:
fromUnit
- U; the unit to convert fromtoUnit
- U; the unit to convert to- Returns:
- multiplication factor to convert a value from fromUnit to toUnit
-