Class ShapeTest.TestHashCode

java.lang.Object
com.takenoko.shape.ShapeTest.TestHashCode
Enclosing class:
ShapeTest

@Nested @DisplayName("Method hashCode") class ShapeTest.TestHashCode extends Object
  • Constructor Details

    • TestHashCode

      TestHashCode()
  • Method Details

    • hashCode_shouldReturnSameHashCodeWhenShapeIsItself

      @Test @DisplayName("should return the same hash code when the shape is itself") void hashCode_shouldReturnSameHashCodeWhenShapeIsItself()
    • hashCode_shouldReturnSameHashCodeWhenShapeHasSameElements

      @Test @DisplayName("should return the same hash code when the shape has the same elements") void hashCode_shouldReturnSameHashCodeWhenShapeHasSameElements()
    • hashCode_shouldReturnDifferentHashCodeWhenShapeHasDifferentElementsColor

      @Test @DisplayName("should return a different hash code when the shape has a different elements color") void hashCode_shouldReturnDifferentHashCodeWhenShapeHasDifferentElementsColor()
    • hashCode_shouldReturnDifferentHashCodeWhenShapeHasDifferentElementsPosition

      @Test @DisplayName("should return a different hash code when the shape has a different elements position") void hashCode_shouldReturnDifferentHashCodeWhenShapeHasDifferentElementsPosition()