Class UnitInterfaceTest


  • @SpecVersion(spec="JSR 385",
                 version="2.1.0")
    public class UnitInterfaceTest
    extends Object
    Testing the Unit Interface
    Since:
    1.0
    Version:
    2.1.1, December 2, 2020
    Author:
    Werner Keil, Almas Shaikh
    • Method Detail

      • testEquals

        @SpecAssertion(section="4.2.1",
                       id="421-A1")
        public void testEquals()
        Test that Unit implementations override equals.
      • testGetDimension

        @SpecAssertion(section="4.2.1",
                       id="421-A2")
        public void testGetDimension()
        Test that Unit implementations contain getters
      • testGetSystemUnit

        @SpecAssertion(section="4.2.1",
                       id="421-A3")
        public void testGetSystemUnit()
        Test that Unit implementations contain getSystemUnit
      • testGetBaseUnits

        @SpecAssertion(section="4.2.1",
                       id="421-A4")
        public void testGetBaseUnits()
        Test that Unit implementations contain getBaseUnits
      • testGetName

        @SpecAssertion(section="4.2.1",
                       id="421-A5")
        public void testGetName()
        Test that Unit implementations contain getters
      • testGetSymbol

        @SpecAssertion(section="4.2.1",
                       id="421-A6")
        public void testGetSymbol()
        Test that Unit implementations contain getters
      • testHashcode

        @SpecAssertion(section="4.2.1",
                       id="421-A7")
        public void testHashcode()
        Test that Unit implementations override hashCode.
      • testIsEquivalentTo

        @SpecAssertion(section="4.2.1",
                       id="421-A8")
        public void testIsEquivalentTo()
        Test that Unit implementations implement isEquivalentTo.
      • testToString

        @SpecAssertion(section="4.2.1",
                       id="421-A9")
        public void testToString()
        Test that Unit implementations override toString.
      • testUnit42121A1_Alternate

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A1")
        public void testUnit42121A1_Alternate()
        Ensure the alternate() operation is implemented.
      • testUnit42121A2_Divide

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A2")
        public void testUnit42121A2_Divide()
        Ensure the divide(Unit) operation is implemented.
      • testUnit42121A3_DivideByDouble

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A3")
        public void testUnit42121A3_DivideByDouble()
        Ensure the divide(double) operation is implemented.
      • testUnit42121A4_DivideByNumber

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A4")
        public void testUnit42121A4_DivideByNumber()
        Ensure the divide(Number) operation is implemented.
      • testUnit42121A5_Multiply

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A5")
        public void testUnit42121A5_Multiply()
        Ensure the multiply() operation is implemented.
      • testUnit42121A6_MultiplyByDouble

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A6")
        public void testUnit42121A6_MultiplyByDouble()
        Ensure the multiply(double) operation is implemented.
      • testUnit42121A7_MultiplyByNumber

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A7")
        public void testUnit42121A7_MultiplyByNumber()
        Ensure the multiply(Number) operation is implemented.
      • testUnit42121A8_Prefix

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A8")
        public void testUnit42121A8_Prefix()
        Ensure the prefix() operation is implemented.
        Since:
        2.0
      • testUnit42121A9_ShiftByDouble

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A9")
        public void testUnit42121A9_ShiftByDouble()
        Ensure the shift() operation is implemented.
      • testUnit42121A10_ShiftByNumber

        @SpecAssertion(section="4.2.1.2",
                       id="42121-A10")
        public void testUnit42121A10_ShiftByNumber()
        Ensure the shift(Number) operation is implemented.
      • testUnit42122Pow

        @SpecAssertion(section="4.2.1.2",
                       id="42122-A1")
        public void testUnit42122Pow()
        Ensure the pow() operation is implemented.
      • testUnit42122Root

        @SpecAssertion(section="4.2.1.2",
                       id="42122-A2")
        public void testUnit42122Root()
        Ensure the root() operation is implemented.
      • testUnit42122Transform

        @SpecAssertion(section="4.2.1.2",
                       id="42122-A3")
        public void testUnit42122Transform()
        Ensure the transform() operation is implemented.
      • testUnit42123Inverse

        @SpecAssertion(section="4.2.1.2",
                       id="42123-A1")
        public void testUnit42123Inverse()
        Ensure the inverse() operation is implemented.
      • testUnit4221IsCompatible

        @SpecAssertion(section="4.2.1.2",
                       id="42124-A1")
        public void testUnit4221IsCompatible()
        Ensure the isCompatible() operation is implemented.
      • testUnit4222AsType

        @SpecAssertion(section="4.2.1.2",
                       id="42124-A2")
        public void testUnit4222AsType()
        Ensure the asType() operation is implemented.
      • testUnit4223GetConverterTo

        @SpecAssertion(section="4.2.1.2",
                       id="42124-A3")
        public void testUnit4223GetConverterTo()
        Ensure the getConverterTo() operation is implemented.
      • testUnit4224GetConverterToAny

        @SpecAssertion(section="4.2.1.2",
                       id="42124-A4")
        public void testUnit4224GetConverterToAny()
        Ensure the getConverterToAny() operation is implemented.