Unlucky
Unlucky copied to clipboard
Adding an Item to the Equipment with the addEquip() method while the index of the Item is 0 or 1 Bug
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 Equipment Class
- Creating an Item with a type value of 0.
- Adding this Item to the Equipment with the addEquip() method.
Assert:
- The method will handle that the type is not greater or equals then 2.
Actually:
- We got ArrayIndexOutOfBoundsException.