mingli1/Unlucky

set the min to be greater then the max in the constructor of the Move class Bug

wee-zard opened this issue · 0 comments

Arrange:

  • Configuring the environment (with for example Gradle v3.3).
  • Importing the junit .jar files, so we can run junit test cases.

Act:

  • Making an instance of Move Class with the following parameters:
    • min = 25
    • max = -3
    • the other parameters can be anything.

Assert:

  • The constructor will handle that the min value is greater then then max value.

Excepting:

  • The constructor set the value of the max to be the value of the min (because the min is greater then the max, and wtih this, the value of the min <= then the value of the max.

Actually:

  • The constructor set the value of the min to the value that is stored in the parameters as min and set the value of the max to the value that is stored in the parameters as max.
  • The constructor not handle that the value of the min is greater then the value of the max.