added a message in piecetest for ShufflePile
This commit is contained in:
@@ -489,7 +489,18 @@ public void testReachBonusField() {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testNoPowerCards() {
|
public void testNoPowerCards() {
|
||||||
// TODO: Implement test logic for when there are no power cards available
|
//sends the server in firstRoll
|
||||||
|
serverGameLogic.setCurrentState(gameState);
|
||||||
|
gameState.setCurrentState(turnState);
|
||||||
|
turnState.setCurrentState(rollDiceState);
|
||||||
|
rollDiceState.setCurrentState(firstRollState);
|
||||||
|
|
||||||
|
//tests if the server is in firstRoll
|
||||||
|
assertEquals(serverGameLogic.getCurrentState(),gameState);
|
||||||
|
assertEquals(gameState.getCurrentState(), turnState);
|
||||||
|
assertEquals(turnState.getCurrentState(),rollDiceState);
|
||||||
|
assertEquals(rollDiceState.getCurrentState(),firstRollState);
|
||||||
|
|
||||||
//sets the active Player to Host
|
//sets the active Player to Host
|
||||||
game.setActiveColor(hostColor);
|
game.setActiveColor(hostColor);
|
||||||
|
|
||||||
@@ -526,22 +537,48 @@ public void testNoPowerCards() {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testShufflePile() {
|
public void testShufflePile() {
|
||||||
//TODO
|
//sends the server in firstRoll
|
||||||
|
serverGameLogic.setCurrentState(gameState);
|
||||||
|
gameState.setCurrentState(turnState);
|
||||||
|
turnState.setCurrentState(rollDiceState);
|
||||||
|
rollDiceState.setCurrentState(firstRollState);
|
||||||
|
|
||||||
|
//tests if the server is in firstRoll
|
||||||
|
assertEquals(serverGameLogic.getCurrentState(),gameState);
|
||||||
|
assertEquals(gameState.getCurrentState(), turnState);
|
||||||
|
assertEquals(turnState.getCurrentState(),rollDiceState);
|
||||||
|
assertEquals(rollDiceState.getCurrentState(),firstRollState);
|
||||||
|
|
||||||
//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 discard pile empty
|
||||||
|
game.setDiscardPile(game.getDrawPile());
|
||||||
|
assertFalse(game.getDiscardPile().isEmpty());
|
||||||
|
|
||||||
//sets the pile empty
|
//sets the pile empty
|
||||||
|
game.setDrawPile(new ArrayList<>());
|
||||||
//sets the discard pile not empty
|
assertTrue(game.getDrawPile().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 a bonusCard
|
||||||
|
assertFalse(game.getDrawPile().isEmpty());
|
||||||
|
|
||||||
|
//tests if the drawPile is not Empty
|
||||||
|
assertFalse(game.getDrawPile().isEmpty());
|
||||||
|
assertTrue(game.getDiscardPile().isEmpty());
|
||||||
|
|
||||||
//tests if the player has received no a bonusCard
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user