Class AbstractOffsetUnitTest<OU extends Unit<OU>>

    • Constructor Detail

      • AbstractOffsetUnitTest

        public AbstractOffsetUnitTest()
    • Method Detail

      • 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 check
        expectedRatio - Double; expected ratio
        expectedOffset - Double; expected offset
        precision - Double; precision of verification
        expectedName - String; expected name in the resources
        expectedAbbreviation - String; expected abbreviation in the resources
      • getMultiplicationFactorTo

        public final double getMultiplicationFactorTo​(OU fromUnit,
                                                      OU 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