Package org.djunits.unit
Class AbstractOffsetUnitTest<OU extends Unit<OU>>
java.lang.Object
org.djunits.unit.AbstractUnitTest<OU>
org.djunits.unit.AbstractOffsetUnitTest<OU>
- Type Parameters:
OU
- Make the test specific for this sub class of OffsetUnit
- Direct Known Subclasses:
AbsoluteTemperatureUnitTest
,PositionUnitTest
,TimeUnitTest
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
checkUnitRatioOffsetNameAndAbbreviation
(OU ou, double expectedRatio, double expectedOffset, 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
(OU fromUnit, OU toUnit) Methods inherited from class org.djunits.unit.AbstractUnitTest
checkUnitNameAndAbbreviation
-
Constructor Details
-
AbstractOffsetUnitTest
public AbstractOffsetUnitTest()
-
-
Method Details
-
checkUnitRatioOffsetNameAndAbbreviation
protected final void checkUnitRatioOffsetNameAndAbbreviation(OU ou, double expectedRatio, double expectedOffset, double precision, String expectedName, String expectedAbbreviation) Verify one length conversion factor to standard unit and the localization of the name and abbreviation.- Parameters:
ou
- Unit to checkexpectedRatio
- Double; expected ratioexpectedOffset
- Double; expected offsetprecision
- 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
-