Package it.polimi.ingsw.Model
Class Card01Test
java.lang.Object
it.polimi.ingsw.Model.Card01Test
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
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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)void
void
void
void
void
void
An invalid player action should error out.void
void
Character card 01 should move a student to the chosen island
-
Constructor Details
-
Card01Test
public Card01Test()
-
-
Method Details
-
cardShouldAlwaysHave4Students
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
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
- Throws:
Exception
-
PawnNotPresentInCard
- Throws:
Exception
-
checkInvalidIslandInput
- Throws:
InputValidationException
-
checkIslandNotInField
- Throws:
Exception
-
EmptyStudentBagCardUse
- Throws:
Exception
-
EmptyStudentBagExceptionCardConstructor
public void EmptyStudentBagExceptionCardConstructor()
-