Package com.irurueta.units
Class PowerUnitTest
java.lang.Object
com.irurueta.units.PowerUnitTest
Tests for
PowerUnit.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidChecks that imperial units are all imperial and, with metric ones, cover every unit.(package private) voidChecks that metric units are all metric and, with imperial ones, cover every unit.(package private) voidChecks that unit systems are resolved for every unit.(package private) voidChecks that a null unit is rejected.(package private) voidChecks imperial detection for every unit.(package private) voidChecks that a null unit is rejected.(package private) voidChecks metric detection for every unit.(package private) voidChecks that a null unit is rejected.
-
Constructor Details
-
PowerUnitTest
PowerUnitTest()
-
-
Method Details
-
getUnitSystem_whenAnyUnit_returnsExpectedSystem
@Test void getUnitSystem_whenAnyUnit_returnsExpectedSystem()Checks that unit systems are resolved for every unit. -
getUnitSystem_whenUnitIsNull_throwsIllegalArgumentException
@Test void getUnitSystem_whenUnitIsNull_throwsIllegalArgumentException()Checks that a null unit is rejected. -
getMetricUnits_whenCalled_returnsOnlyMetricUnits
@Test void getMetricUnits_whenCalled_returnsOnlyMetricUnits()Checks that metric units are all metric and, with imperial ones, cover every unit. -
getImperialUnits_whenCalled_returnsOnlyImperialUnits
@Test void getImperialUnits_whenCalled_returnsOnlyImperialUnits()Checks that imperial units are all imperial and, with metric ones, cover every unit. -
isMetric_whenAnyUnit_returnsExpectedResult
@Test void isMetric_whenAnyUnit_returnsExpectedResult()Checks metric detection for every unit. -
isMetric_whenUnitIsNull_throwsIllegalArgumentException
@Test void isMetric_whenUnitIsNull_throwsIllegalArgumentException()Checks that a null unit is rejected. -
isImperial_whenAnyUnit_returnsExpectedResult
@Test void isImperial_whenAnyUnit_returnsExpectedResult()Checks imperial detection for every unit. -
isImperial_whenUnitIsNull_throwsIllegalArgumentException
@Test void isImperial_whenUnitIsNull_throwsIllegalArgumentException()Checks that a null unit is rejected.
-