Package com.irurueta.units
Class PowerTest
java.lang.Object
com.irurueta.units.PowerTest
Tests for
Power.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidChecks addition of instances in every overload.(package private) voidChecks static addition with doubles and numbers.(package private) voidChecks constructors.(package private) voidChecks that null arguments are rejected.(package private) voidChecks constructor with value and unit.(package private) voidChecks equals and hash code.(package private) voidChecks equality with tolerance, including unit conversion.(package private) voidChecks value and unit accessors.(package private) voidChecks subtraction of instances in every overload.(package private) voidChecks static subtraction with doubles and numbers.
-
Field Details
-
ERROR
private static final double ERRORAllowed error.- See Also:
-
VALUE1
private static final double VALUE1First value.- See Also:
-
VALUE2
private static final double VALUE2Second value.- See Also:
-
-
Constructor Details
-
PowerTest
PowerTest()
-
-
Method Details
-
constructor_whenEmpty_hasNoValueNorUnit
@Test void constructor_whenEmpty_hasNoValueNorUnit()Checks constructors. -
constructor_whenValueAndUnit_setsThem
@Test void constructor_whenValueAndUnit_setsThem()Checks constructor with value and unit. -
constructor_whenNullArgument_throwsIllegalArgumentException
@Test void constructor_whenNullArgument_throwsIllegalArgumentException()Checks that null arguments are rejected. -
equals_whenSameAndDifferentInstances_returnsExpectedResult
@Test void equals_whenSameAndDifferentInstances_returnsExpectedResult()Checks equals and hash code. -
equals_whenTolerance_comparesAfterConversion
@Test void equals_whenTolerance_comparesAfterConversion()Checks equality with tolerance, including unit conversion. -
setValue_whenNull_throwsIllegalArgumentException
@Test void setValue_whenNull_throwsIllegalArgumentException()Checks value and unit accessors. -
add_whenStaticValues_returnsSumInResultUnit
@Test void add_whenStaticValues_returnsSumInResultUnit()Checks static addition with doubles and numbers. -
add_whenInstances_storesSum
@Test void add_whenInstances_storesSum()Checks addition of instances in every overload. -
subtract_whenStaticValues_returnsDifferenceInResultUnit
@Test void subtract_whenStaticValues_returnsDifferenceInResultUnit()Checks static subtraction with doubles and numbers. -
subtract_whenInstances_storesDifference
@Test void subtract_whenInstances_storesDifference()Checks subtraction of instances in every overload.
-