Adding test case for the player list (in the lobby) and polishing other tests.
This commit is contained in:
@@ -87,6 +87,14 @@ public class RunRankingGameTest extends TestBase {
|
||||
|
||||
long firstPlayerId = userInit();
|
||||
|
||||
// Waiting for player list update.
|
||||
PokerTHMessage msg;
|
||||
msg = receiveMessage();
|
||||
if (!msg.isPlayerListMessageSelected()) {
|
||||
failOnErrorMessage(msg);
|
||||
fail("Invalid message.");
|
||||
}
|
||||
|
||||
Collection<Integer> l = new ArrayList<Integer>();
|
||||
String gameName = AuthUser + " run ranking game";
|
||||
NetGameInfo gameInfo = createGameInfo(5, EndRaiseModeEnumType.EnumType.doubleBlinds, 0, 50, gameName, l, 10, 0, 11, 10000);
|
||||
@@ -98,8 +106,6 @@ public class RunRankingGameTest extends TestBase {
|
||||
"",
|
||||
false));
|
||||
|
||||
PokerTHMessage msg;
|
||||
|
||||
// Game list update (new game)
|
||||
msg = receiveMessage();
|
||||
if (!msg.isGameListMessageSelected()) {
|
||||
@@ -135,6 +141,14 @@ public class RunRankingGameTest extends TestBase {
|
||||
String username = "test" + (i+1);
|
||||
String password = username;
|
||||
playerId[i] = userInit(s[i], username, password);
|
||||
// Waiting for player list update.
|
||||
do {
|
||||
msg = receiveMessage(s[i]);
|
||||
} while (msg.isGameListMessageSelected() || msg.isGamePlayerMessageSelected());
|
||||
if (!msg.isPlayerListMessageSelected()) {
|
||||
failOnErrorMessage(msg);
|
||||
fail("Invalid message.");
|
||||
}
|
||||
sendMessage(joinGameRequestMsg(gameId, "", false), s[i]);
|
||||
do {
|
||||
msg = receiveMessage(s[i]);
|
||||
|
||||
Reference in New Issue
Block a user