added a testmethod for the piece for no powerCards
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
import pp.mdga.server.automaton.game.turn.rolldice.FirstRollState;
|
import pp.mdga.server.automaton.game.turn.rolldice.FirstRollState;
|
||||||
|
|
||||||
import java.sql.SQLOutput;
|
import java.sql.SQLOutput;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -490,20 +491,31 @@ public void testReachBonusField() {
|
|||||||
public void testNoPowerCards() {
|
public void testNoPowerCards() {
|
||||||
// TODO: Implement test logic for when there are no power cards available
|
// TODO: Implement test logic for when there are no power cards available
|
||||||
//sets the active Player to Host
|
//sets the active Player to Host
|
||||||
|
game.setActiveColor(hostColor);
|
||||||
|
|
||||||
//sets the dice-seed to 4
|
//sets the dice-seed to 4
|
||||||
|
game.setDie(die4);
|
||||||
|
|
||||||
//sets the pile empty
|
//sets the pile empty
|
||||||
|
game.setDrawPile(new ArrayList<>());
|
||||||
|
assertTrue(game.getDrawPile().isEmpty());
|
||||||
|
|
||||||
//sets the discard pile empty
|
//sets the discard pile empty
|
||||||
|
game.setDiscardPile(new ArrayList<>());
|
||||||
|
assertTrue(game.getDiscardPile().isEmpty());
|
||||||
|
|
||||||
//sends the requestDice-Message
|
//sends the requestDice-Message
|
||||||
|
serverGameLogic.received(new RequestMoveMessage(pieceHost1.getUuid()),IDHost);
|
||||||
|
|
||||||
// requestMOve of hostPiece3
|
// requestMOve of hostPiece3
|
||||||
|
serverGameLogic.received(new RequestMoveMessage(pieceHost3.getUuid()),IDHost);
|
||||||
|
|
||||||
//tests the position of hostPiece3
|
assertTrue(game.getBoard().getInfield()[4].isOccupied());
|
||||||
|
assertEquals(game.getBoard().getInfield()[4].getOccupant(),pieceHost3);
|
||||||
|
|
||||||
//tests if the player has received no a bonusCard
|
//tests if the player has received a bonusCard
|
||||||
|
assertTrue(game.getDrawPile().isEmpty());
|
||||||
|
assertTrue(game.getPlayers().get(IDHost).getHandCards().stream().toList().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user