Commit eb048573 authored by Killian LUCAS's avatar Killian LUCAS
Browse files

GameTest.java update

parent 1862ad5f
......@@ -15,6 +15,8 @@ import fr.univnantes.alma.server.game.item.jeton.PlacedJeton;
import fr.univnantes.alma.server.game.item.planet.Place;
import fr.univnantes.alma.server.game.item.planet.Planet;
import fr.univnantes.alma.server.game.utilitary.Pair;
import fr.univnantes.alma.server.user.PlayerProxy;
import fr.univnantes.alma.server.user.User;
import fr.univnantes.alma.thrift.TAskAction;
import org.apache.thrift.TException;
import org.junit.jupiter.api.BeforeEach;
......@@ -193,7 +195,9 @@ public class GameTest {
assertEquals( 2,game.getPlayersMap().size());
//verifcation getPlayer
assertEquals("Player1",game.getPlayer(1).getName());
//verification reserve
//verification room
assertSame(game.getRoom(),game.getRoom());
//verification reserve
assertEquals(new Reserve(new ArrayList<PlaceCard>(Arrays.asList(marais,abri,epave,source,artefact)),2).getPlaceCards(),game.getReserve().getPlaceCards());
assertEquals(new Score(7,13), board.getScore());
board.moveForwardTraque(11);
......@@ -211,6 +215,10 @@ public class GameTest {
assertTrue(game.playerPlayCard(2, Collections.singletonList(plage)).state);
assertTrue(game.playerHasFinished(2, Phase.PHASE_1).state);
//verification erreur
assertThrows(IllegalArgumentException.class,() -> game.playerHasFinished(1,Phase.POSTPHASE_2));
assertTrue(game.playerHasFinished(1, Phase.POSTPHASE_1).state);
assertTrue(game.playerHasFinished(2, Phase.POSTPHASE_1).state);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment