Class PressureTest

java.lang.Object
com.irurueta.units.PressureTest

class PressureTest extends Object
Tests for Pressure.
  • Field Details

  • Constructor Details

    • PressureTest

      PressureTest()
  • Method Details

    • constructor_whenEmpty_hasNoValueNorUnit

      @Test void constructor_whenEmpty_hasNoValueNorUnit()
      Checks the empty (package-private) constructor.
    • constructor_whenValueAndUnit_setsThem

      @Test void constructor_whenValueAndUnit_setsThem()
      Checks the constructor with value and unit.
    • constructor_whenNullArguments_throwsIllegalArgumentException

      @Test void constructor_whenNullArguments_throwsIllegalArgumentException()
      Checks that null arguments are rejected by the constructor.
    • equals_whenSameOrDifferentContent_returnsExpectedResult

      @Test void equals_whenSameOrDifferentContent_returnsExpectedResult()
      Checks equality and hash code.
    • equals_whenTolerance_returnsExpectedResult

      @Test void equals_whenTolerance_returnsExpectedResult()
      Checks equality with tolerance, including conversion between units.
    • setValueAndSetUnit_whenValid_updateState

      @Test void setValueAndSetUnit_whenValid_updateState()
      Checks value and unit accessors.
    • setValueAndSetUnit_whenNull_throwsIllegalArgumentException

      @Test void setValueAndSetUnit_whenNull_throwsIllegalArgumentException()
      Checks that null value or unit is rejected by the setters.
    • add_whenDoubles_returnsSumInResultUnit

      @Test void add_whenDoubles_returnsSumInResultUnit()
      Checks static addition of doubles.
    • add_whenNumbers_returnsSumInResultUnit

      @Test void add_whenNumbers_returnsSumInResultUnit()
      Checks static addition of numbers.
    • add_whenInstances_storesSumInResult

      @Test void add_whenInstances_storesSumInResult()
      Checks static addition of instances with mixed units.
    • addAndReturnNew_whenAnyVariant_returnsNewInstanceWithSum

      @Test void addAndReturnNew_whenAnyVariant_returnsNewInstanceWithSum()
      Checks addition variants that return new instances.
    • add_whenInPlaceVariants_updatesInstance

      @Test void add_whenInPlaceVariants_updatesInstance()
      Checks in-place addition variants.
    • subtract_whenDoubles_returnsDifferenceInResultUnit

      @Test void subtract_whenDoubles_returnsDifferenceInResultUnit()
      Checks static subtraction of doubles.
    • subtract_whenNumbers_returnsDifferenceInResultUnit

      @Test void subtract_whenNumbers_returnsDifferenceInResultUnit()
      Checks static subtraction of numbers.
    • subtract_whenInstances_storesDifferenceInResult

      @Test void subtract_whenInstances_storesDifferenceInResult()
      Checks static subtraction of instances with mixed units.
    • subtractAndReturnNew_whenAnyVariant_returnsNewInstanceWithDifference

      @Test void subtractAndReturnNew_whenAnyVariant_returnsNewInstanceWithDifference()
      Checks subtraction variants that return new instances.
    • subtract_whenInPlaceVariants_updatesInstance

      @Test void subtract_whenInPlaceVariants_updatesInstance()
      Checks in-place subtraction variants.