Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Corentin GUILLEVIC
Not Alone
Commits
eb048573
Commit
eb048573
authored
Dec 09, 2020
by
Killian LUCAS
Browse files
GameTest.java update
parent
1862ad5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
not-alone-server/src/test/java/fr/univnantes/alma/server/game/GameTest.java
View file @
eb048573
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment