mingli1 / Unlucky

Java LibGDX Android 2D RPG Game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

We can add the Util.SHIELD moveset twice to an instance of a SpecialMoveset class twice, as special moveset Bug

wee-zard opened this issue · 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 a SpecialMoveset Class
  • Store this instance in a variable
  • Check if addSMove() method is declared and implemented in the SpecialMoveset Class
  • Call the addSMove() method on the variable (that stores an instance of the SpecialMoveset Class) and call it with a Util.SHIELD as parameter, and do it twice.

Assert:

  • Only one moveset should be stored as special moveset.

Excepting:

  • Only 1 moveset is stored as special moveset in the variable.

Actually:

  • The size of the array is 2, so we stored twice the Util.SHIELD as moveset.

bug4