Class Card01Test

java.lang.Object
it.polimi.ingsw.Model.Card01Test

public class Card01Test extends Object
This test set verifies that character card 01 is able to hold, move and identify students.
It should hold only 4 students, it should move students only to an island, and it should identify which students it currently holds to error out if somebody tries to access a student which the card doesn't manage
  • Constructor Details

    • Card01Test

      public Card01Test()
  • Method Details

    • cardShouldAlwaysHave4Students

      public void cardShouldAlwaysHave4Students() throws Exception
      Character card 01 should always hold 4 students, it should do so by refilling itself from the student bag when it gets used (and loses 1 student)
      Throws:
      Exception - is thrown when an invalid card activation happens, but this test should not error out (by definition)
    • usingEffectShouldAddStudentToIsland

      public void usingEffectShouldAddStudentToIsland() throws Exception
      Character card 01 should move a student to the chosen island
      Throws:
      Exception - is thrown when an invalid card activation happens, but this test should not error out (by definition)
    • NoIslandException

      public void NoIslandException()
      An invalid player action should error out.
      The island could be wrong, the selected student could be not hold by the card, or the input object could be constructed wrongly in some other ways.
    • EmptyPawnException

      public void EmptyPawnException() throws Exception
      Throws:
      Exception
    • PawnNotPresentInCard

      public void PawnNotPresentInCard() throws Exception
      Throws:
      Exception
    • checkInvalidIslandInput

      public void checkInvalidIslandInput() throws InputValidationException
      Throws:
      InputValidationException
    • checkIslandNotInField

      public void checkIslandNotInField() throws Exception
      Throws:
      Exception
    • EmptyStudentBagCardUse

      public void EmptyStudentBagCardUse() throws Exception
      Throws:
      Exception
    • EmptyStudentBagExceptionCardConstructor

      public void EmptyStudentBagExceptionCardConstructor()