Package it.polimi.ingsw.Model
Class Card10Test
java.lang.Object
it.polimi.ingsw.Model.Card10Test
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAn invalid player action should error out.voidIf the selected student from the entrance has the same colour of a full dining room's row you cannot swap this studentvoidAn invalid player action should error out.voidcheckUse()Card 10 should be able to move students from entrance to dining room and vice-versa
-
Field Details
-
gb
-
card10
-
-
Constructor Details
-
Card10Test
public Card10Test()
-
-
Method Details
-
checkUse
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
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
- Throws:
Exception
-
checkInvalidEntranceSize
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
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
-