Package org.djunits.unit
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-2019 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
Constructors Constructor Description AbstractLinearUnitTest()
-
Method Summary
Modifier and Type Method Description protected 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.double
getMultiplicationFactorTo(U fromUnit, U toUnit)
-
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
-