-
- -

Class UnitDatabaseTest

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • org.unitConverter.unit.UnitDatabaseTest
    • -
    -
  • -
-
-
    -
  • -
    -
    class UnitDatabaseTest
    -extends java.lang.Object
    -
    A test for the UnitDatabase class. This is NOT part of this program's public API.
    -
    -
    Since:
    -
    2019-04-14, v0.2.0
    -
    Author:
    -
    Adrien Hopkins
    -
    -
  • -
-
-
-
    -
  • - -
    - -
    - -
    -
      -
    • - - -

      Constructor Summary

      - - - - - - - - - - -
      Constructors 
      ConstructorDescription
      UnitDatabaseTest() 
      -
    • -
    -
    - -
    -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidtestInfiniteSetExceptions() -
      Confirms that operations that shouldn't function for infinite databases throw an IllegalStateException.
      -
      voidtestPrefixes() -
      Test that prefixes correctly apply to units.
      -
      voidtestPrefixlessUnitMap() -
      Tests the functionnalites of the prefixless unit map.
      -
      voidtestPrefixlessUnits() -
      Tests that the database correctly stores and retrieves units, ignoring prefixes.
      -
      voidtestUnitExpressions() -
      Test that unit expressions return the correct value.
      -
      voidtestUnitIterator() -
      Tests both the unit name iterator and the name-unit entry iterator
      -
      voidtestUnitPrefixCombinations() -
      Determine, given a unit name that could mean multiple things, which meaning is chosen.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
    -
  • -
-
-
-
    -
  • - -
    - -
    - -
    -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        UnitDatabaseTest

        -
        UnitDatabaseTest()
        -
      • -
      -
    • -
    -
    - -
    -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        testInfiniteSetExceptions

        -
        @Test
        -public void testInfiniteSetExceptions()
        -
        Confirms that operations that shouldn't function for infinite databases throw an IllegalStateException.
        -
        -
        Since:
        -
        2019-05-03
        -
        -
      • -
      - - - -
        -
      • -

        testPrefixes

        -
        @Test
        -public void testPrefixes()
        -
        Test that prefixes correctly apply to units.
        -
        -
        Since:
        -
        2019-04-14, v0.2.0
        -
        -
      • -
      - - - -
        -
      • -

        testPrefixlessUnitMap

        -
        @Test
        -public void testPrefixlessUnitMap()
        -
        Tests the functionnalites of the prefixless unit map. - -

        - The map should be an auto-updating view of the units in the database. -

        -
        -
        Since:
        -
        2019-04-14, v0.2.0
        -
        -
      • -
      - - - -
        -
      • -

        testPrefixlessUnits

        -
        @Test
        -public void testPrefixlessUnits()
        -
        Tests that the database correctly stores and retrieves units, ignoring prefixes.
        -
        -
        Since:
        -
        2019-04-14, v0.2.0
        -
        -
      • -
      - - - -
        -
      • -

        testUnitExpressions

        -
        @Test
        -public void testUnitExpressions()
        -
        Test that unit expressions return the correct value.
        -
        -
        Since:
        -
        2019-04-14, v0.2.0
        -
        -
      • -
      - - - -
        -
      • -

        testUnitIterator

        -
        @Test
        -public void testUnitIterator()
        -
        Tests both the unit name iterator and the name-unit entry iterator
        -
        -
        Since:
        -
        2019-04-14, v0.2.0
        -
        -
      • -
      - - - -
        -
      • -

        testUnitPrefixCombinations

        -
        @Test
        -public void testUnitPrefixCombinations()
        -
        Determine, given a unit name that could mean multiple things, which meaning is chosen. -

        - For example, "ABCU" could mean "A-B-C-U", "AB-C-U", or "A-BC-U". In this case, "AB-C-U" is the correct choice. -

        -
        -
        Since:
        -
        2019-04-14, v0.2.0
        -
        -
      • -
      -
    • -
    -
    -
  • -
-
-
-