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
9522f17b
Commit
9522f17b
authored
Dec 11, 2020
by
Killian LUCAS
Browse files
GameTest.java update add of several tests
parent
000a01d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
not-alone-server/src/test/java/fr/univnantes/alma/server/game/GameTest.java
View file @
9522f17b
...
@@ -222,6 +222,9 @@ class GameTest {
...
@@ -222,6 +222,9 @@ class GameTest {
assertTrue
(
game
.
traqueCanResist
());
assertTrue
(
game
.
traqueCanResist
());
game
.
getGameRoundVariables
().
setTraqueCanResist
(
false
);
game
.
getGameRoundVariables
().
setTraqueCanResist
(
false
);
assertFalse
(
game
.
traqueCanResist
());
assertFalse
(
game
.
traqueCanResist
());
game
.
setTraqueCanResist
(
true
);
assertTrue
(
game
.
traqueCanResist
());
}
}
@Test
@Test
...
@@ -232,6 +235,9 @@ class GameTest {
...
@@ -232,6 +235,9 @@ class GameTest {
assertTrue
(
game
.
traqueCanPickSurvivalCards
());
assertTrue
(
game
.
traqueCanPickSurvivalCards
());
game
.
getGameRoundVariables
().
setTraqueCanPickSurvivalCards
(
false
);
game
.
getGameRoundVariables
().
setTraqueCanPickSurvivalCards
(
false
);
assertFalse
(
game
.
traqueCanPickSurvivalCards
());
assertFalse
(
game
.
traqueCanPickSurvivalCards
());
game
.
setTraqueCanPickSurvivalCards
(
true
);
assertTrue
(
game
.
traqueCanPickSurvivalCards
());
}
}
@Test
@Test
...
@@ -456,7 +462,7 @@ class GameTest {
...
@@ -456,7 +462,7 @@ class GameTest {
when
(
room
.
askAction
(
any
(
Integer
.
class
),
any
(
TAskAction
.
class
)))
when
(
room
.
askAction
(
any
(
Integer
.
class
),
any
(
TAskAction
.
class
)))
.
thenReturn
(
new
ActionChoosePower
(
0
));
.
thenReturn
(
new
ActionChoosePower
(
0
));
assertEquals
(
Phase
.
PREPHASE_1
,
game
.
getState
());
assertTrue
(
game
.
playerHasFinished
(
1
,
Phase
.
PREPHASE_1
).
state
);
assertTrue
(
game
.
playerHasFinished
(
1
,
Phase
.
PREPHASE_1
).
state
);
assertTrue
(
game
.
playerHasFinished
(
2
,
Phase
.
PREPHASE_1
).
state
);
assertTrue
(
game
.
playerHasFinished
(
2
,
Phase
.
PREPHASE_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