Class Card10Test

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

public class Card10Test extends Object
This test set verifies that character card 10 is able to swap up to 2 students from entrance to dining room and vice-versa; the set also covers the edge cases related to invalid actions from the players.
  • Field Details

  • Constructor Details

    • Card10Test

      public Card10Test()
  • Method Details

    • checkUse

      public void checkUse() throws ContainerException
      Card 10 should be able to move students from entrance to dining room and vice-versa
      Throws:
      ContainerException - is thrown when you try to add a student to a full dining room, but this test should not error out (by definition)
    • checkEmptyInput

      public void checkEmptyInput() throws Exception
      An invalid player action should error out.
      A pair of students has to be selected for the action to be working
      Throws:
      Exception - an invalid input has been used to activate the card
    • asymmetricInput

      public void asymmetricInput() throws Exception
      Throws:
      Exception
    • checkInvalidEntranceSize

      public void checkInvalidEntranceSize() throws Exception
      An invalid player action should error out.
      Check that same student from entrance cannot be swapped twice
      Throws:
      Exception - an invalid input has been used to activate the card
    • checkInvalidDiningRoomSize

      public void checkInvalidDiningRoomSize() throws Exception
      If the selected student from the entrance has the same colour of a full dining room's row you cannot swap this student
      Throws:
      Exception - an invalid input has been used to activate the card