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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
An invalid player action should error out.void
If the selected student from the entrance has the same colour of a full dining room's row you cannot swap this studentvoid
An invalid player action should error out.void
checkUse()
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
-