Package com.irurueta.units
Class EnergyUnitTest
java.lang.Object
com.irurueta.units.EnergyUnitTest
Unit tests for
EnergyUnit.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidChecks that imperial units are imperial and that metric and imperial units cover all units.(package private) voidChecks that metric units are metric and that metric and imperial units cover all units.(package private) voidChecks that every unit maps to its expected unit system and that a null unit is rejected.(package private) voidChecks imperial detection for every unit and that a null unit is rejected.(package private) voidChecks metric detection for every unit and that a null unit is rejected.
-
Constructor Details
-
EnergyUnitTest
EnergyUnitTest()
-
-
Method Details
-
getUnitSystem_whenUnit_returnsExpectedSystemOrThrowsWhenNull
@Test void getUnitSystem_whenUnit_returnsExpectedSystemOrThrowsWhenNull()Checks that every unit maps to its expected unit system and that a null unit is rejected. -
getMetricUnits_whenCalled_returnsOnlyMetricUnits
@Test void getMetricUnits_whenCalled_returnsOnlyMetricUnits()Checks that metric units are metric and that metric and imperial units cover all units. -
getImperialUnits_whenCalled_returnsOnlyImperialUnits
@Test void getImperialUnits_whenCalled_returnsOnlyImperialUnits()Checks that imperial units are imperial and that metric and imperial units cover all units. -
isMetric_whenUnit_returnsExpectedResultOrThrowsWhenNull
@Test void isMetric_whenUnit_returnsExpectedResultOrThrowsWhenNull()Checks metric detection for every unit and that a null unit is rejected. -
isImperial_whenUnit_returnsExpectedResultOrThrowsWhenNull
@Test void isImperial_whenUnit_returnsExpectedResultOrThrowsWhenNull()Checks imperial detection for every unit and that a null unit is rejected.
-